Trace by symbol instead of instruction count.#670
Conversation
ngober
left a comment
There was a problem hiding this comment.
I like this change, I anticipate it will be very useful for people writing benchmarks. Thanks for the patch!
|
Oh by the way, this should close #455 |
|
@joshualmashburn Have you looked any further into #455? Were you able to learn anything about it? |
|
I am unsure if this closes that issue. See my new comments in #455 . We should test this version with a nonzero number to skip, but from what I see, that particular mechanism hasn't changed, so I'm somewhat doubtful. |
|
If this doesn't actually solve #455 as-is, I would rather fix it in a separate patch, rather than trying to work it into this patch. If they can be independent, let's let them be independent. |
|
Separate PR for #455 inbound. Upon a quick skim, it looks orthogonal enough. |
|
As I suspected, the two patches have a merge conflict. @Easyoakland if you can resolve this, we'll get this patch merged. |
|
Why's that PR make the global volatile? It should be atomic like this PR made it. It's not a machine register for performing I/O. |
@joshualmashburn, did you actually test this PR? It stopped tracing for me exactly as expected. (Yes, this includes if you specify |
|
@Easyoakland I didn't imply that I did; I am traveling currently. I just tested it and yes it works. Good work. Keep the skip and trace instruction counts global to reduce those function call overheads, but go ahead with your changes, including making instruction count atomic. Edit: I haven't thoroughly tested the symbol functionality. Boarding a flight now. I'll test it more in a moment. |
|
@Easyoakland could you please document the new feature in the README as well? Please give an example usage of the new options. |
This doesn't make any sense. The implementation for
I've added an example and updated the README.
Merge conflict resolved. |
Author: Nathan Gober Committer: GitHub Merge pull request #670 from Easyoakland/develop Trace by symbol instead of instruction count.
Author: Nathan Gober Committer: GitHub Merge pull request ChampSim#670 from Easyoakland/develop Trace by symbol instead of instruction count.
Feature
Adds two new command line options to the pin tracer:
start_symbolandstop_symbol.These allow precisely controlling when tracing occurs. When the start_symbol is reached tracing is enabled, and when the stop_symbol is reached tracing is disabled. This can be used on existing binaries (possibly by using
objdump -d -j .textor similar to find the symbol) or by purposefully creating an unmangled function and inserting it into the binary which is intended on being traced.If the new arguments are unspecified, behavior is the same as before the feature except that:
This pr also changes the tracer so that after the number of instructions specified by
-thave been traced, the pin tool terminates the traced program, since there is no reason to continue execution.Misc
From what I can see prs are expected to pull request into the
developbranch. Let me know if I'm mistaken.I wrote this because I found it useful. If inclusion is unwanted, let me know and I'll close the pr.