|
@@ -48,11 +48,11 @@ Getting Traces
|
|
--------------
|
|
--------------
|
|
|
|
|
|
By default, XRay does not write out the trace files or patch the application
|
|
By default, XRay does not write out the trace files or patch the application
|
|
-before main starts. If we just run ``llc`` it should just work like a normally
|
|
|
|
-built binary. However, if we want to get a full trace of the application's
|
|
|
|
-operations (of the functions we do end up instrumenting with XRay) then we need
|
|
|
|
-to enable XRay at application start. To do this, XRay checks the
|
|
|
|
-``XRAY_OPTIONS`` environment variable.
|
|
|
|
|
|
+before main starts. If we run ``llc`` it should work like a normally built
|
|
|
|
+binary. If we want to get a full trace of the application's operations (of the
|
|
|
|
+functions we do end up instrumenting with XRay) then we need to enable XRay
|
|
|
|
+at application start. To do this, XRay checks the ``XRAY_OPTIONS`` environment
|
|
|
|
+variable.
|
|
|
|
|
|
::
|
|
::
|
|
|
|
|
|
@@ -73,9 +73,8 @@ instrumented, and how much time we're spending in parts of the code. To make
|
|
sense of this data, we use the ``llvm-xray`` tool which has a few subcommands
|
|
sense of this data, we use the ``llvm-xray`` tool which has a few subcommands
|
|
to help us understand our trace.
|
|
to help us understand our trace.
|
|
|
|
|
|
-One of the simplest things we can do is to get an accounting of the functions
|
|
|
|
-that have been instrumented. We can see an example accounting with ``llvm-xray
|
|
|
|
-account``:
|
|
|
|
|
|
+One of the things we can do is to get an accounting of the functions that have
|
|
|
|
+been instrumented. We can see an example accounting with ``llvm-xray account``:
|
|
|
|
|
|
::
|
|
::
|
|
|
|
|
|
@@ -202,8 +201,7 @@ Given a trace, and optionally an instrumentation map, the ``llvm-xray stack``
|
|
command can be used to analyze a call stack graph constructed from the function
|
|
command can be used to analyze a call stack graph constructed from the function
|
|
call timeline.
|
|
call timeline.
|
|
|
|
|
|
-The simplest way to use the command is simply to output the top stacks by call
|
|
|
|
-count and time spent.
|
|
|
|
|
|
+The way to use the command is to output the top stacks by call count and time spent.
|
|
|
|
|
|
::
|
|
::
|
|
|
|
|
|
@@ -245,7 +243,7 @@ FlameGraph tool, currently available on `github
|
|
|
|
|
|
To generate output for a flamegraph, a few more options are necessary.
|
|
To generate output for a flamegraph, a few more options are necessary.
|
|
|
|
|
|
-- ``-all-stacks`` - Emits all of the stacks instead of just the top stacks.
|
|
|
|
|
|
+- ``-all-stacks`` - Emits all of the stacks.
|
|
- ``-stack-format`` - Choose the flamegraph output format 'flame'.
|
|
- ``-stack-format`` - Choose the flamegraph output format 'flame'.
|
|
- ``-aggregation-type`` - Choose the metric to graph.
|
|
- ``-aggregation-type`` - Choose the metric to graph.
|
|
|
|
|