logoNeutrino

Trace Analysis Callback

To automate the trace analysis, neutrino supports attach callback to analyze the trace dumped or draw the figures.

Most callbacks are a Python executable based on the trace reading code, but you can use Python's subprocess to incorporate other (faster) programming language, such as dmat use C++ to accelerate the analysis.

How to use

neutrino supports two ways to attach the callback:

  • Manual with --callback <path/to/callback> in CLI.
  • Automatic with CALLBACK = "<path/to/callback>" in probe.py or probe.toml.

Both approach accepts a path to the executable and the PATH will be searched based on the directory of your probe (if direct path is not found).

Manual approach has a higher priority for development, and automatic approach suitable for the development.

How it works

neutrino's callback will be handled by the hook driver at the last stage. After saving the trace to disk, hook driver will fork and exec the callback with dumped trace path as the argument, like the following:

callback
python <path/to/callback> <path/to/trace>

We may update it to a multi-thread async version for better performance.