-
Notifications
You must be signed in to change notification settings - Fork 23
Prospero Tracing
To create traces to use with our LSTMs, we have been using the Prospero trace tool that comes with SST-Elements. This tool uses Intel Pin to instrument binaries and insert instructions before every memory access so that we are able to record them.
The pintool is located at sst-elements/src/sst/elements/prospero/prosperotrace.so. It is bulit automatically with SST-Elements so long as --with-pin is used when configuring.
Alongside the pintool, a wrapper program called sst-prospero-trace is also built. This program simplifies the use of the pintool ever so slightly, but it doesn't expose all of the options that the pintool provides.
In particular, we would like to specify the -d flag to the pintool, which disables tracing at the start of a program and waits for prospero_enable_tracing() to be called. This makes our traces much cleaner, as it allows us to cut out things like program initialization and data allocation. Therefore, we will not be using sst-prospero-trace in these steps.
To enable and disable tracing manually, complete the following:
- Identify the kernel of interest in the code.
- Place
prospero_enable_tracing()andprospero_disable_tracing()calls around the kernel. - Either include
prospero.hor just add new functions to the code calledprospero_enable_tracingandprospero_disable_tracing. The pintool doesn't care what the functions do -- it just searches for them and replaces them with the proper code to enable and disable tracing. - Compile your code
- Trace your code with
pin -t prosperotrace.so -d 0 -- myApp