app/trace: include relation information while printing json

Add relation information to printed json traces to later read them
in trace.py.

Change-Id: I090b7ffa2b85da00b6ad57825c7208dd5cfc396a
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9637
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
Krzysztof Karas 2021-09-27 10:31:41 +00:00 committed by Jim Harris
parent 5d95e31510
commit ed54725a79

View File

@ -243,6 +243,14 @@ print_event_json(struct spdk_trace_parser_entry *entry, uint64_t tsc_rate, uint6
spdk_json_write_named_uint64(g_json, "value", e->object_id);
spdk_json_write_object_end(g_json);
}
/* Print related objects array */
if (entry->related_index != UINT64_MAX) {
spdk_json_write_named_string_fmt(g_json, "related", "%c%" PRIu64,
g_flags->object[entry->related_type].id_prefix,
entry->related_index);
}
if (d->num_args > 0) {
spdk_json_write_named_array_begin(g_json, "args");
for (i = 0; i < d->num_args; ++i) {