Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my working branch for exploring OS-level tracing capabilities. So far it includes:
This adds a build dependency (SystemTap) on Linux systems, so it might make sense to put this behind a flag. IMHO the (build-only) dependency is worth its weight and USDT probes should be there by default. What this gives you is that you can attach to probes (these were already defined for use with DTrace on Darwin) of running CCL processes via BCC’s trace:
PERF-HELPER
, a mechanism to export symbol map files for use with Linux’sperf(1)
. The code/magic for this module was provided by Gary Byers, and worked out of the box, credit to him! In a nutshell it allows you to dump a map of the current heap:which allows
perf(1)
to reconstruct stack traces of a running CCL process. Now when you profile CCL via perf:Or instead of using
perf report
generate fancy SVG flame graphs, see http://www.brendangregg.com/flamegraphs.html :-)If you look at the flame graph you can see that there are still a bunch of “unknown” frames. Some of these are kernel frames, and merely unresolved because I ran the example as a regular user, but some are indeed frames that point into the CCL process but can’t be resolved via the perf map. That’s a FIXME.
TODO