Date: Thu, 7 Jun 2018 03:19:21 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334753 - head/lib/libpmc Message-ID: <201806070319.w573JLAM029434@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Thu Jun 7 03:19:21 2018 New Revision: 334753 URL: https://svnweb.freebsd.org/changeset/base/334753 Log: libpmc: add missed (uintmax_t) casts Modified: head/lib/libpmc/libpmc_json.cc (contents, props changed) Modified: head/lib/libpmc/libpmc_json.cc ============================================================================== --- head/lib/libpmc/libpmc_json.cc Thu Jun 7 02:54:11 2018 (r334752) +++ head/lib/libpmc/libpmc_json.cc Thu Jun 7 03:19:21 2018 (r334753) @@ -75,7 +75,7 @@ startentry(struct pmclog_ev *ev) char eventbuf[128]; snprintf(eventbuf, sizeof(eventbuf), "%s, \"tsc\": \"%jd\"", - typenames[ev->pl_type], (intmax_t)ev->pl_ts.tv_sec); + typenames[ev->pl_type], (uintmax_t)ev->pl_ts.tv_sec); return (string(eventbuf)); } @@ -163,7 +163,7 @@ procexec_to_json(struct pmclog_ev *ev) "%s, \"pmcid\": \"0x%08x\", \"pid\": \"%d\", " "\"start\": \"0x%016jx\", \"pathname\": \"%s\"}\n", startent.c_str(), ev->pl_u.pl_x.pl_pmcid, ev->pl_u.pl_x.pl_pid, - ev->pl_u.pl_x.pl_entryaddr, ev->pl_u.pl_x.pl_pathname); + (uintmax_t)ev->pl_u.pl_x.pl_entryaddr, ev->pl_u.pl_x.pl_pathname); return string(eventbuf); } @@ -264,10 +264,10 @@ callchain_to_json(struct pmclog_ev *ev) ev->pl_u.pl_cc.pl_tid, ev->pl_u.pl_cc.pl_cpuflags, ev->pl_u.pl_cc.pl_cpuflags2); result = string(eventbuf); for (i = 0; i < ev->pl_u.pl_cc.pl_npc - 1; i++) { - snprintf(eventbuf, sizeof(eventbuf), "\"0x%016jx\", ", ev->pl_u.pl_cc.pl_pc[i]); + snprintf(eventbuf, sizeof(eventbuf), "\"0x%016jx\", ", (uintmax_t)ev->pl_u.pl_cc.pl_pc[i]); result += string(eventbuf); } - snprintf(eventbuf, sizeof(eventbuf), "\"0x%016jx\"]}\n", ev->pl_u.pl_cc.pl_pc[i]); + snprintf(eventbuf, sizeof(eventbuf), "\"0x%016jx\"]}\n", (uintmax_t)ev->pl_u.pl_cc.pl_pc[i]); result += string(eventbuf); return (result); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806070319.w573JLAM029434>