Support a wider history counter in pmcstat(8) gmon output
authorjtl <jtl@FreeBSD.org>
Wed, 18 Nov 2015 14:52:01 +0000 (14:52 +0000)
committerjtl <jtl@FreeBSD.org>
Wed, 18 Nov 2015 14:52:01 +0000 (14:52 +0000)
commite193259d09b131078045dc18c4137a2acf7a59b3
treee3ca21a82be5670e8115ace302774a3d2c47571a
parente9f56ea6e729d21dd6c4b73100ba14f792ea4189
Support a wider history counter in pmcstat(8) gmon output

pmcstat(8) contains an option to output sampling data in a gmon format
compatible with gprof(1). Currently, it uses the default histcounter,
which is an (unsigned short). With large sets of sampling data, it
is possible to overflow the maximum value provided by an (unsigned
short).

This change adds the -e argument to pmcstat. If -e and -g are both
specified, pmcstat will use a histcounter type of uint64_t.

Differential Revision: https://reviews.freebsd.org/D4151
Reviewed by: jhb, bjk
Approved by: gnn (mentor)
MFC after: 1 month
Sponsored by: Juniper Networks
usr.sbin/pmcstat/pmcpl_gprof.c
usr.sbin/pmcstat/pmcstat.8
usr.sbin/pmcstat/pmcstat.c
usr.sbin/pmcstat/pmcstat.h