From owner-svn-src-all@freebsd.org Thu Jun 7 03:20:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3CC7FF21F1; Thu, 7 Jun 2018 03:20:00 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A88317A29D; Thu, 7 Jun 2018 03:19:21 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A1901A86F; Thu, 7 Jun 2018 03:19:21 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w573JL3a029435; Thu, 7 Jun 2018 03:19:21 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w573JLAM029434; Thu, 7 Jun 2018 03:19:21 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201806070319.w573JLAM029434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Thu, 7 Jun 2018 03:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334753 - head/lib/libpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/lib/libpmc X-SVN-Commit-Revision: 334753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 03:20:00 -0000 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); }