Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drcachesim function trace viewing tool #4083

Closed
derekbruening opened this issue Feb 6, 2020 · 0 comments · Fixed by #4150
Closed

Add drcachesim function trace viewing tool #4083

derekbruening opened this issue Feb 6, 2020 · 0 comments · Fixed by #4150

Comments

@derekbruening
Copy link
Contributor

The proposal is to create a simple analysis tool which will provide both a sequential view of the function trace data recorded in a drcachesim trace (through -record_heap or -record_function) as well as aggregate counts.

@derekbruening derekbruening self-assigned this Feb 6, 2020
derekbruening added a commit that referenced this issue Feb 24, 2020
Adds a new module_mapper_t interface read_without_mapping_modules()
for parsing the module bounds without mapping the modules into memory.

Adds find_trace_module() for querying which module a given trace PC
came from, for use cases such as the function trace viewing tool (to
identify which symbol came from which library) where the data inside
the modules is not needed.

Adds a test.

Issue: #4083
derekbruening added a commit that referenced this issue Feb 28, 2020
Changes -record_function interface to *not* specify an id.  The tracer
now assigns id's, with separate id's per library!function instance.

Each "library!function" string is written to a new "funclist" file in
the destination directory, with the line # as the id.  Uses the
passed-in file write interface to write the file.

Exposes drmemtrace_get_funclist_path() in the drmemtrace.h interface
and adds a test of it.

A separate change will add a new option "op_funclist_file" and file
reading support for the forthcoming func_view tool.

Issue: #4083
derekbruening added a commit that referenced this issue Feb 29, 2020
Changes -record_function interface to *not* specify an id.  The tracer
now assigns id's, with separate id's per library!function instance.

Each "library!function" string is written to a new "funclist" file in
the destination directory, with the id prepended: "id,library!function".  Uses the
passed-in file write interface to write the file.

Exposes drmemtrace_get_funclist_path() in the drmemtrace.h interface
and adds a test of it.

A separate change will add a new option "op_funclist_file" and file
reading support for the forthcoming func_view tool.

Issue: #4083
derekbruening added a commit that referenced this issue Mar 3, 2020
Adds a new func_view tool for visualizing and analyzing function calls
recorded in a drcachesim trace.  It does two things in its initial
form: it reports the summary count of calls and returns for every
function traced, and if a new option op_show_func_trace is set (on by
default), it prints a linear sequence of every call and return with
return addresses, argument values, and return values.  Each is
indented to enable a clear picture of the call sequence.

Adds a new option op_funclist_file to specify the file's path, though
normally it will be auto-found.

Adds raw2trace_directory_t support for parsing the funclist file.

Adds example output for the new tool to the docs.  Adds a brief
section to the docs on function tracing in general, which was
previously missing.

Adds a func_view test which runs fib(5) and ensures we get the nested
function trace correct.

Fixes #4083
derekbruening added a commit that referenced this issue Mar 4, 2020
Adds a new func_view tool for visualizing and analyzing function calls
recorded in a drcachesim trace.  It does two things in its initial
form: it reports the summary count of calls and returns for every
function traced, and if a new option op_show_func_trace is set (on by
default), it prints a linear sequence of every call and return with
return addresses, argument values, and return values.  Each is
indented to enable a clear picture of the call sequence.

Adds a new option op_funclist_file to specify the file's path, though
normally it will be auto-found.

Adds raw2trace_directory_t support for parsing the funclist file.

Adds example output for the new tool to the docs.  Adds a brief
section to the docs on function tracing in general, which was
previously missing.

Adds a func_view test which runs fib(5) and ensures we get the nested
function trace correct.

Disables the test on Windows due to unreproducible-locally Appveyor failures.
#4155 covers figuring that out later.

Issue: #4155
Fixes #4083
derekbruening added a commit that referenced this issue Sep 28, 2020
After an upgdate, my machine has 7-digit thread id's, causing the
func_view tests to fail.  Here I widen the printed field and update
the expected output for the stored trace.

Issue: #4083
derekbruening added a commit that referenced this issue Sep 28, 2020
After an upgdate, my machine has 7-digit thread id's, causing the
func_view tests to fail.  Here I widen the printed field and update
the expected output for the stored trace.

Issue: #4083
derekbruening added a commit that referenced this issue Sep 29, 2020
After an upgdate, my machine has 7-digit thread id's, causing the
func_view tests to fail.  Here I widen the printed field and update
the expected output for the stored trace.

Issue: #4083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant