Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
500a1e9b
Commit
500a1e9b
authored
Sep 08, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flesh out rewriter stats a little bit
parent
15230c41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
src/asm_writing/rewriter.cpp
src/asm_writing/rewriter.cpp
+17
-5
No files found.
src/asm_writing/rewriter.cpp
View file @
500a1e9b
...
...
@@ -651,6 +651,9 @@ void Rewriter::abort() {
finished
=
true
;
rewrite
->
abort
();
static
StatCounter
rewriter_aborts
(
"rewriter_aborts"
);
rewriter_aborts
.
log
();
for
(
auto
v
:
args
)
{
v
->
decUse
();
}
...
...
@@ -663,8 +666,8 @@ void Rewriter::commit() {
assert
(
!
finished
);
finished
=
true
;
static
StatCounter
rewriter
2_commits
(
"rewriter2
_commits"
);
rewriter
2
_commits
.
log
();
static
StatCounter
rewriter
_commits
(
"rewriter
_commits"
);
rewriter_commits
.
log
();
assert
(
done_guarding
&&
"Could call setDoneGuarding for you, but probably best to do it yourself"
);
// if (!done_guarding)
...
...
@@ -969,9 +972,9 @@ Rewriter::Rewriter(ICSlotRewrite* rewrite, int num_args, const std::vector<int>&
args
.
push_back
(
var
);
}
static
StatCounter
rewriter_starts
(
"rewriter
2
_starts"
);
static
StatCounter
rewriter_starts
(
"rewriter_starts"
);
rewriter_starts
.
log
();
static
StatCounter
rewriter_spillsavoided
(
"rewriter
2
_spillsavoided"
);
static
StatCounter
rewriter_spillsavoided
(
"rewriter_spillsavoided"
);
// Calculate the list of live-ins based off the live-outs list,
// and create a Use of them so that they get preserved
...
...
@@ -1008,13 +1011,22 @@ Rewriter::Rewriter(ICSlotRewrite* rewrite, int num_args, const std::vector<int>&
Rewriter
*
Rewriter
::
createRewriter
(
void
*
rtn_addr
,
int
num_args
,
const
char
*
debug_name
)
{
ICInfo
*
ic
=
getICInfo
(
rtn_addr
);
static
StatCounter
rewriter_attempts
(
"rewriter_attempts"
);
rewriter_attempts
.
log
();
static
StatCounter
rewriter_nopatch
(
"rewriter_nopatch"
);
static
StatCounter
rewriter_skipped
(
"rewriter_skipped"
);
if
(
!
ic
||
!
ic
->
shouldAttempt
()
)
{
if
(
!
ic
)
{
rewriter_nopatch
.
log
();
return
NULL
;
}
if
(
!
ic
->
shouldAttempt
())
{
rewriter_skipped
.
log
();
return
NULL
;
}
return
new
Rewriter
(
ic
->
startRewrite
(
debug_name
),
num_args
,
ic
->
getLiveOuts
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment