numam-spdk/scripts/bpf
Konrad Sztyber 597688b2b1 scripts/trace: use ijson to parse the traces
Since the trace files can get very large (several GBs), parsing them
using python's json module might require an unfeasible amount of memory,
as it needs to load the whole file first.  The ijson [1] library
provides interfaces for parsing files iteratively, only loading a small
portion of a file at a time.

It requires the input JSON to have the tsc_rate and the definitions of
the tracepoints listed before the tracepoint entries.  It's not a big
deal, as this is the way `spdk_trace` generates it, but it's worth
noting, as passing that file through something like `jq -S` might make
it unreadable to the trace script.

[1] https://pypi.org/project/ijson

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I03c0c3fb47091da615a3978b8d63edf4d876b811
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
2021-07-07 09:43:37 +00:00
..
gen_enums.sh nvmf: add USDT probes for subsystem state changes 2021-06-08 08:27:15 +00:00
nvmf.bt usdt: pass ticks as the first probe argument 2021-06-28 16:17:35 +00:00
readv.bt scripts: add bpf/readv.bt 2021-05-21 08:03:27 +00:00
send_msg.bt scripts: add bpf/send_msg.bt 2021-05-21 08:03:27 +00:00
syscalls.bt scripts: add bpf/syscalls.bt 2021-05-21 08:03:27 +00:00
trace.py scripts/trace: use ijson to parse the traces 2021-07-07 09:43:37 +00:00