app/trace: Use PRIu64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a portable way. Replace a reference to %lu to remove the assumption about the size of a long. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Change-Id: I5696bcdb3add3d8b9d5ea91d9bc50b1dad1fbc95 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8685 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
673afb3074
commit
e7da88dd66
@ -369,12 +369,12 @@ print_event_json(struct spdk_trace_entry *e, uint64_t tsc_rate,
|
||||
spdk_json_write_named_object_begin(g_json, "object");
|
||||
if (d->new_object) {
|
||||
object_type = g_histories->flags.object[d->object_type].id_prefix;
|
||||
spdk_json_write_named_string_fmt(g_json, "id", "%c%lu", object_type,
|
||||
spdk_json_write_named_string_fmt(g_json, "id", "%c%" PRIu64, object_type,
|
||||
stats->index[e->object_id]);
|
||||
} else if (d->object_type != OBJECT_NONE) {
|
||||
object_type = g_histories->flags.object[d->object_type].id_prefix;
|
||||
if (stats->start.find(e->object_id) != stats->start.end()) {
|
||||
spdk_json_write_named_string_fmt(g_json, "id", "%c%lu",
|
||||
spdk_json_write_named_string_fmt(g_json, "id", "%c%" PRIu64,
|
||||
object_type,
|
||||
stats->index[e->object_id]);
|
||||
spdk_json_write_named_uint64(g_json, "time",
|
||||
|
Loading…
Reference in New Issue
Block a user