Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zipr_callbacks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Open Source Software
zipr_callbacks
Commits
ff88dc41
Commit
ff88dc41
authored
7 years ago
by
whh8b
Browse files
Options
Downloads
Patches
Plain Diff
Change default size to 60 and do not swap two dollops if they are the same.
parent
32978fdb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mixr/mixr.c
+14
-1
14 additions, 1 deletion
mixr/mixr.c
with
14 additions
and
1 deletion
mixr/mixr.c
+
14
−
1
View file @
ff88dc41
...
...
@@ -41,7 +41,7 @@ static int q_fd;
#ifdef TEST
#define MIXR_FIXED_SIZE (sizeof(int))
#else
#define MIXR_FIXED_SIZE (
4
0)
#define MIXR_FIXED_SIZE (
6
0)
#endif
#ifdef DEBUG
...
...
@@ -125,6 +125,7 @@ unsigned int mixr_find_dollop_containing(void *table_addr, uint64_t addr, uint8_
for
(
table_iterator
=
0
;
table_iterator
<
table_length
;
table_iterator
++
)
{
table_iterator_address
=
dt_table_read_entry_address
(
table_addr
,
table_iterator
);
if
(
table_iterator_address
<=
addr
&&
addr
<=
(
table_iterator_address
+
MIXR_FIXED_SIZE
))
{
*
found
=
1
;
return
table_iterator
;
...
...
@@ -657,6 +658,14 @@ void zipr_mixr(void *table_addr)
continue
;
}
if
(
a
==
b
)
{
#ifdef DEBUG
print_str_debug
(
"Skipping swap from ourself to ourself
\n
"
);
#endif
continue
;
}
dt_table_swap_entry_contents
(
table_addr
,
a
,
b
);
/*
* Rewrite a.
...
...
@@ -745,6 +754,9 @@ void zipr_hook_start(unsigned long long id,
print_str_debug
(
"ra:"
);
print_unsigned_long_long_debug
(
ra
);
print_str_debug
(
"
\n
"
);
print_str_debug
(
"global_table_addr:"
);
print_unsigned_long_long_debug
(
id
);
print_str_debug
(
"
\n
"
);
#endif
global_table_addr
=
(
void
*
)
id
;
...
...
@@ -753,6 +765,7 @@ void zipr_hook_start(unsigned long long id,
void
zipr_hook_dynamic_callback
(
unsigned
int
id
,
unsigned
long
long
rax
,
unsigned
long
long
rsp
)
{
print_str_debug
(
"zipr_hook_dynamic_callback()
\n
"
);
zipr_mixr
(
global_table_addr
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment