Commit e7da88dd authored by Nick Connolly's avatar Nick Connolly Committed by Tomasz Zawadzki
Browse files

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: default avatarNick Connolly <nick.connolly@mayadata.io>
Change-Id: I5696bcdb3add3d8b9d5ea91d9bc50b1dad1fbc95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8685


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 673afb30
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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",