tracing: Add hist_json event file
Add a file named hist_json for each trace event. Reading it will dump
the contents of all current histogram(s) defined on the event in json
format.
The file contents include not only the histogram bucket contents but
also related data associated with the histogram such as histogram
info, totals, and the values of any action variables that may be
associated with it.
If there are multiple histograms associated with an event, each
histogram is dumped in its entirety before the next starts.
The same functions that print the histogram to the 'hist' file are
used to print the 'hist_json' contents. Other formats can easily be
added by adding a new show_format in addition to the TEXT and JSON
formats implemented here.
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
3 files changed