1e572c7a7SJoseph Koshy.\" Copyright (c) 2003-2008 Joseph Koshy 2b6010f9eSJoseph Koshy.\" Copyright (c) 2007 The FreeBSD Foundation 3b6010f9eSJoseph Koshy.\" All rights reserved. 4ebccf1e3SJoseph Koshy.\" 5ebccf1e3SJoseph Koshy.\" Redistribution and use in source and binary forms, with or without 6ebccf1e3SJoseph Koshy.\" modification, are permitted provided that the following conditions 7ebccf1e3SJoseph Koshy.\" are met: 8ebccf1e3SJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright 9ebccf1e3SJoseph Koshy.\" notice, this list of conditions and the following disclaimer. 10ebccf1e3SJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright 11ebccf1e3SJoseph Koshy.\" notice, this list of conditions and the following disclaimer in the 12ebccf1e3SJoseph Koshy.\" documentation and/or other materials provided with the distribution. 13ebccf1e3SJoseph Koshy.\" 14ebccf1e3SJoseph Koshy.\" This software is provided by Joseph Koshy ``as is'' and 15ebccf1e3SJoseph Koshy.\" any express or implied warranties, including, but not limited to, the 16ebccf1e3SJoseph Koshy.\" implied warranties of merchantability and fitness for a particular purpose 17ebccf1e3SJoseph Koshy.\" are disclaimed. in no event shall Joseph Koshy be liable 18ebccf1e3SJoseph Koshy.\" for any direct, indirect, incidental, special, exemplary, or consequential 19ebccf1e3SJoseph Koshy.\" damages (including, but not limited to, procurement of substitute goods 20ebccf1e3SJoseph Koshy.\" or services; loss of use, data, or profits; or business interruption) 21ebccf1e3SJoseph Koshy.\" however caused and on any theory of liability, whether in contract, strict 22ebccf1e3SJoseph Koshy.\" liability, or tort (including negligence or otherwise) arising in any way 23ebccf1e3SJoseph Koshy.\" out of the use of this software, even if advised of the possibility of 24ebccf1e3SJoseph Koshy.\" such damage. 25ebccf1e3SJoseph Koshy.\" 26ebccf1e3SJoseph Koshy.\" $FreeBSD$ 27ebccf1e3SJoseph Koshy.\" 282c79db51SJoseph Koshy.Dd September 19, 2008 29ebccf1e3SJoseph Koshy.Os 30ebccf1e3SJoseph Koshy.Dt PMCSTAT 8 31ebccf1e3SJoseph Koshy.Sh NAME 32ebccf1e3SJoseph Koshy.Nm pmcstat 3321ce09caSJoseph Koshy.Nd "performance measurement with performance monitoring hardware" 34ebccf1e3SJoseph Koshy.Sh SYNOPSIS 35ebccf1e3SJoseph Koshy.Nm 36ebccf1e3SJoseph Koshy.Op Fl C 3715139246SJoseph Koshy.Op Fl D Ar pathname 38f263522aSJoseph Koshy.Op Fl E 39b6010f9eSJoseph Koshy.Op Fl G Ar pathname 4049874f6eSJoseph Koshy.Op Fl M Ar mapfilename 41b6010f9eSJoseph Koshy.Op Fl N 42ebccf1e3SJoseph Koshy.Op Fl O Ar logfilename 43ebccf1e3SJoseph Koshy.Op Fl P Ar event-spec 44f263522aSJoseph Koshy.Op Fl R Ar logfilename 45ebccf1e3SJoseph Koshy.Op Fl S Ar event-spec 46f263522aSJoseph Koshy.Op Fl W 47ee4910b1SJoseph Koshy.Op Fl c Ar cpu-spec 48ebccf1e3SJoseph Koshy.Op Fl d 49f263522aSJoseph Koshy.Op Fl g 5049874f6eSJoseph Koshy.Op Fl k Ar kerneldir 51c0252222SAttilio Rao.Op Fl m Ar pathname 5221ce09caSJoseph Koshy.Op Fl n Ar rate 53ebccf1e3SJoseph Koshy.Op Fl o Ar outputfile 54ebccf1e3SJoseph Koshy.Op Fl p Ar event-spec 5549874f6eSJoseph Koshy.Op Fl q 5649874f6eSJoseph Koshy.Op Fl r Ar fsroot 57ebccf1e3SJoseph Koshy.Op Fl s Ar event-spec 58fbd8b34aSJoseph Koshy.Op Fl t Ar process-spec 5949874f6eSJoseph Koshy.Op Fl v 6021ce09caSJoseph Koshy.Op Fl w Ar secs 61b6010f9eSJoseph Koshy.Op Fl z Ar graphdepth 6221ce09caSJoseph Koshy.Op Ar command Op Ar args 63ebccf1e3SJoseph Koshy.Sh DESCRIPTION 64ebccf1e3SJoseph KoshyThe 65ebccf1e3SJoseph Koshy.Nm 66ebccf1e3SJoseph Koshyutility measures system performance using the facilities provided by 67ebccf1e3SJoseph Koshy.Xr hwpmc 4 . 68ebccf1e3SJoseph Koshy.Pp 69ebccf1e3SJoseph KoshyThe 70ebccf1e3SJoseph Koshy.Nm 71ebccf1e3SJoseph Koshyutility can measure both hardware events seen by the system as a 72fbd8b34aSJoseph Koshywhole, and those seen when a specified set of processes are executing 73fbd8b34aSJoseph Koshyon the system's CPUs. 74fbd8b34aSJoseph KoshyIf a specific set of processes is being targeted (for example, 75ebccf1e3SJoseph Koshyif the 76fbd8b34aSJoseph Koshy.Fl t Ar process-spec 77ebccf1e3SJoseph Koshyoption is specified, or if a command line is specified using 78ebccf1e3SJoseph Koshy.Ar command ) , 79fbd8b34aSJoseph Koshythen measurement occurs till 80fbd8b34aSJoseph Koshy.Ar command 81fbd8b34aSJoseph Koshyexits, or till all target processes specified by the 82fbd8b34aSJoseph Koshy.Fl t Ar process-spec 83fbd8b34aSJoseph Koshyoptions exit, or till the 84ebccf1e3SJoseph Koshy.Nm 85ebccf1e3SJoseph Koshyutility is interrupted by the user. 86fbd8b34aSJoseph KoshyIf a specific set of processes is not targeted for measurement, then 87ebccf1e3SJoseph Koshy.Nm 88ebccf1e3SJoseph Koshywill perform system-wide measurements till interrupted by the 89ebccf1e3SJoseph Koshyuser. 90ebccf1e3SJoseph Koshy.Pp 91ebccf1e3SJoseph KoshyA given invocation of 92ebccf1e3SJoseph Koshy.Nm 93ebccf1e3SJoseph Koshycan mix allocations of system-mode and process-mode PMCs, of both 94ebccf1e3SJoseph Koshycounting and sampling flavors. 95ebccf1e3SJoseph KoshyThe values of all counting PMCs are printed in human readable form 96ebccf1e3SJoseph Koshyat regular intervals by 97ebccf1e3SJoseph Koshy.Nm . 98f263522aSJoseph KoshyThe output of sampling PMCs may be configured to go to a log file for 99f263522aSJoseph Koshysubsequent offline analysis, or, at the expense of greater 10021ce09caSJoseph Koshyoverhead, may be configured to be printed in text form on the fly. 101ebccf1e3SJoseph Koshy.Pp 102ebccf1e3SJoseph KoshyHardware events to measure are specified to 103ebccf1e3SJoseph Koshy.Nm 104ebccf1e3SJoseph Koshyusing event specifier strings 105ebccf1e3SJoseph Koshy.Ar event-spec . 106ebccf1e3SJoseph KoshyThe syntax of these event specifiers is machine dependent and is 107ebccf1e3SJoseph Koshydocumented in 108ebccf1e3SJoseph Koshy.Xr pmc 3 . 109ebccf1e3SJoseph Koshy.Pp 110ebccf1e3SJoseph KoshyA process-mode PMC may be configured to be inheritable by the target 111ebccf1e3SJoseph Koshyprocess' current and future children. 112ebccf1e3SJoseph Koshy.Sh OPTIONS 113ebccf1e3SJoseph KoshyThe following options are available: 114ebccf1e3SJoseph Koshy.Bl -tag -width indent 115ebccf1e3SJoseph Koshy.It Fl C 116f263522aSJoseph KoshyToggle between showing cumulative or incremental counts for 117ebccf1e3SJoseph Koshysubsequent counting mode PMCs specified on the command line. 118ebccf1e3SJoseph KoshyThe default is to show incremental counts. 119f263522aSJoseph Koshy.It Fl D Ar pathname 120f263522aSJoseph KoshyCreate files with per-program samples in the directory named 121f263522aSJoseph Koshyby 122f263522aSJoseph Koshy.Ar pathname . 123f263522aSJoseph KoshyThe default is to create these files in the current directory. 124f263522aSJoseph Koshy.It Fl E 125f263522aSJoseph KoshyToggle showing per-process counts at the time a tracked process 126f263522aSJoseph Koshyexits for subsequent process-mode PMCs specified on the command line. 127f263522aSJoseph KoshyThis option is useful for mapping the performance characteristics of a 128f263522aSJoseph Koshycomplex pipeline of processes when used in conjunction with the 129f263522aSJoseph Koshy.Fl d 130f263522aSJoseph Koshyoption. 131f263522aSJoseph KoshyThe default is to not to enable per-process tracking. 132b6010f9eSJoseph Koshy.It Fl G Ar pathname 133b6010f9eSJoseph KoshyPrint callchain information to file 134b6010f9eSJoseph Koshy.Ar pathname . 135b6010f9eSJoseph KoshyIf argument 136b6010f9eSJoseph Koshy.Ar pathname 137b6010f9eSJoseph Koshyis a 138b6010f9eSJoseph Koshy.Dq Li - 139b6010f9eSJoseph Koshythis information is sent to the output file specified by the 140b6010f9eSJoseph Koshy.Fl o 141b6010f9eSJoseph Koshyoption. 14249874f6eSJoseph Koshy.It Fl M Ar mapfilename 14349874f6eSJoseph KoshyWrite the mapping between executable objects encountered in the event 14449874f6eSJoseph Koshylog and the abbreviated pathnames used for 14549874f6eSJoseph Koshy.Xr gprof 1 14649874f6eSJoseph Koshyprofiles to file 14749874f6eSJoseph Koshy.Ar mapfilename . 14849874f6eSJoseph KoshyIf this option is not specified, mapping information is not written. 14949874f6eSJoseph KoshyArgument 15049874f6eSJoseph Koshy.Ar mapfilename 15149874f6eSJoseph Koshymay be a 15249874f6eSJoseph Koshy.Dq Li - 15349874f6eSJoseph Koshyin which case this mapping information is sent to the output 15449874f6eSJoseph Koshyfile configured by the 15549874f6eSJoseph Koshy.Fl o 15649874f6eSJoseph Koshyoption. 157b6010f9eSJoseph Koshy.It Fl N 158b6010f9eSJoseph KoshyToggle capturing callchain information for subsequent sampling PMCs. 159b6010f9eSJoseph KoshyThe default is for sampling PMCs to capture callchain information. 160ebccf1e3SJoseph Koshy.It Fl O Ar logfilename 16121ce09caSJoseph KoshySend logging output to file 162ebccf1e3SJoseph Koshy.Ar logfilename . 163302cbb90SJoseph KoshyIf 164302cbb90SJoseph Koshy.Ar logfilename 165302cbb90SJoseph Koshyis of the form 166302cbb90SJoseph Koshy.Ar hostname Ns : Ns Ar port , 167302cbb90SJoseph Koshywhere 168302cbb90SJoseph Koshy.Ar hostname 169302cbb90SJoseph Koshydoes not start with a 170bc84aa4bSRuslan Ermilov.Ql \&. 171302cbb90SJoseph Koshyor a 172bc84aa4bSRuslan Ermilov.Ql / , 173302cbb90SJoseph Koshythen 174302cbb90SJoseph Koshy.Nm 175302cbb90SJoseph Koshywill open a network socket to host 176302cbb90SJoseph Koshy.Ar hostname 177302cbb90SJoseph Koshyon port 178302cbb90SJoseph Koshy.Ar port . 179302cbb90SJoseph Koshy.Pp 180302cbb90SJoseph KoshyIf the 181302cbb90SJoseph Koshy.Fl O 182302cbb90SJoseph Koshyoption is not specified and one of the logging options is requested, 183302cbb90SJoseph Koshythen 184f263522aSJoseph Koshy.Nm 18521ce09caSJoseph Koshywill print a textual form of the logged events to the configured 186f263522aSJoseph Koshyoutput file. 187ebccf1e3SJoseph Koshy.It Fl P Ar event-spec 188ebccf1e3SJoseph KoshyAllocate a process mode sampling PMC measuring hardware events 189ebccf1e3SJoseph Koshyspecified in 190ebccf1e3SJoseph Koshy.Ar event-spec . 191f263522aSJoseph Koshy.It Fl R Ar logfilename 192f263522aSJoseph KoshyPerform offline analysis using sampling data in file 193f263522aSJoseph Koshy.Ar logfilename . 194ebccf1e3SJoseph Koshy.It Fl S Ar event-spec 195ebccf1e3SJoseph KoshyAllocate a system mode sampling PMC measuring hardware events 196ebccf1e3SJoseph Koshyspecified in 197ebccf1e3SJoseph Koshy.Ar event-spec . 198f263522aSJoseph Koshy.It Fl W 199f263522aSJoseph KoshyToggle logging the incremental counts seen by the threads of a 200f263522aSJoseph Koshytracked process each time they are scheduled on a CPU. 201f263522aSJoseph KoshyThis is an experimental feature intended to help analyse the 202f263522aSJoseph Koshydynamic behaviour of processes in the system. 203f263522aSJoseph KoshyIt may incur substantial overhead if enabled. 204f263522aSJoseph KoshyThe default is for this feature to be disabled. 205ee4910b1SJoseph Koshy.It Fl c Ar cpu-spec 206ee4910b1SJoseph KoshySet the cpus for subsequent system mode PMCs specified on the 207ebccf1e3SJoseph Koshycommand line to 208ee4910b1SJoseph Koshy.Ar cpu-spec . 209ee4910b1SJoseph KoshyArgument 210ee4910b1SJoseph Koshy.Ar cpu-spec 211ee4910b1SJoseph Koshyis a comma separated list of CPU numbers, or the literal 212ee4910b1SJoseph Koshy.Sq * 2135477328dSJoseph Koshydenoting all unhalted CPUs. 2145477328dSJoseph KoshyThe default is to allocate system mode PMCs on all unhalted 2155477328dSJoseph KoshyCPUs. 216ebccf1e3SJoseph Koshy.It Fl d 217ebccf1e3SJoseph KoshyToggle between process mode PMCs measuring events for the target 218ebccf1e3SJoseph Koshyprocess' current and future children or only measuring events for 219f263522aSJoseph Koshythe target process. 220ebccf1e3SJoseph KoshyThe default is to measure events for the target process alone. 221f263522aSJoseph Koshy.It Fl g 222b6010f9eSJoseph KoshyProduce profiles in a format compatible with 223f263522aSJoseph Koshy.Xr gprof 1 . 2241fdbf256SJoseph KoshyA separate profile file is generated for each executable object 2251fdbf256SJoseph Koshyencountered. 2261fdbf256SJoseph KoshyProfile files are placed in sub-directories named by their PMC 2271fdbf256SJoseph Koshyevent name. 22849874f6eSJoseph Koshy.It Fl k Ar kerneldir 22949874f6eSJoseph KoshySet the pathname of the kernel directory to argument 23049874f6eSJoseph Koshy.Ar kerneldir . 23149874f6eSJoseph KoshyThis directory specifies where 23249874f6eSJoseph Koshy.Nm 23349874f6eSJoseph Koshyshould look for the kernel and its modules. 23415139246SJoseph KoshyThe default is 23549874f6eSJoseph Koshy.Pa /boot/kernel . 236c0252222SAttilio Rao.It Fl m Ar pathname 237c0252222SAttilio RaoPrint the sampled PCs with the name, the start and ending addresses 238c0252222SAttilio Raoof the function within they live. 239c0252222SAttilio RaoThe 240c0252222SAttilio Rao.Ar pathname 241c0252222SAttilio Raoargument is mandatory and indicates where informations will be stored. 242c0252222SAttilio RaoIf argument 243c0252222SAttilio Rao.Ar pathname 244c0252222SAttilio Raois a 245c0252222SAttilio Rao.Dq Li - 246c0252222SAttilio Raothis information is sent to the output file specified by the 247c0252222SAttilio Rao.Fl o 248c0252222SAttilio Raooption. 249ebccf1e3SJoseph Koshy.It Fl n Ar rate 250ebccf1e3SJoseph KoshySet the default sampling rate for subsequent sampling mode 251ebccf1e3SJoseph KoshyPMCs specified on the command line. 252ebccf1e3SJoseph KoshyThe default is to configure PMCs to sample the CPU's instruction 253ebccf1e3SJoseph Koshypointer every 65536 events. 254ebccf1e3SJoseph Koshy.It Fl o Ar outputfile 25521ce09caSJoseph KoshySend counter readings and textual representations of logged data 256ebccf1e3SJoseph Koshyto file 257ebccf1e3SJoseph Koshy.Ar outputfile . 258ebccf1e3SJoseph KoshyThe default is to send output to 259b6010f9eSJoseph Koshy.Pa stderr 260b6010f9eSJoseph Koshywhen collecting live data and to 261b6010f9eSJoseph Koshy.Pa stdout 262b6010f9eSJoseph Koshywhen processing a pre-existing logfile. 263ebccf1e3SJoseph Koshy.It Fl p Ar event-spec 264ebccf1e3SJoseph KoshyAllocate a process mode counting PMC measuring hardware events 265ebccf1e3SJoseph Koshyspecified in 266ebccf1e3SJoseph Koshy.Ar event-spec . 26749874f6eSJoseph Koshy.It Fl q 26849874f6eSJoseph KoshyDecrease verbosity. 26949874f6eSJoseph Koshy.It Fl r Ar fsroot 27049874f6eSJoseph KoshySet the top of the filesystem hierarchy under which executables 27149874f6eSJoseph Koshyare located to argument 27249874f6eSJoseph Koshy.Ar fsroot . 27349874f6eSJoseph KoshyThe default is 27449874f6eSJoseph Koshy.Pa / . 275ebccf1e3SJoseph Koshy.It Fl s Ar event-spec 276ebccf1e3SJoseph KoshyAllocate a system mode counting PMC measuring hardware events 277ebccf1e3SJoseph Koshyspecified in 278ebccf1e3SJoseph Koshy.Ar event-spec . 279fbd8b34aSJoseph Koshy.It Fl t Ar process-spec 280fbd8b34aSJoseph KoshyAttach process mode PMCs to the processes named by argument 281fbd8b34aSJoseph Koshy.Ar process-spec . 282fbd8b34aSJoseph KoshyArgument 283fbd8b34aSJoseph Koshy.Ar process-spec 284fbd8b34aSJoseph Koshymay be a non-negative integer denoting a specific process id, or a 285fbd8b34aSJoseph Koshyregular expression for selecting processes based on their command names. 28649874f6eSJoseph Koshy.It Fl v 28749874f6eSJoseph KoshyIncrease verbosity. 288ebccf1e3SJoseph Koshy.It Fl w Ar secs 289ebccf1e3SJoseph KoshyPrint the values of all counting mode PMCs every 290ebccf1e3SJoseph Koshy.Ar secs 291ebccf1e3SJoseph Koshyseconds. 292ebccf1e3SJoseph KoshyThe argument 293ebccf1e3SJoseph Koshy.Ar secs 294ebccf1e3SJoseph Koshymay be a fractional value. 295ebccf1e3SJoseph KoshyThe default interval is 5 seconds. 296b6010f9eSJoseph Koshy.It Fl z Ar graphdepth 297b6010f9eSJoseph KoshyWhen printing system-wide callgraphs, limit callgraphs to the depth 298b6010f9eSJoseph Koshyspecified by argument 299b6010f9eSJoseph Koshy.Ar graphdepth . 300ebccf1e3SJoseph Koshy.El 301ebccf1e3SJoseph Koshy.Pp 302ebccf1e3SJoseph KoshyIf 303ebccf1e3SJoseph Koshy.Ar command 304ebccf1e3SJoseph Koshyis specified, it is executed using 305ebccf1e3SJoseph Koshy.Xr execvp 3 . 306ebccf1e3SJoseph Koshy.Sh EXAMPLES 307ebccf1e3SJoseph KoshyTo perform system-wide statistical sampling on an AMD Athlon CPU with 308ebccf1e3SJoseph Koshysamples taken every 32768 instruction retirals and data being sampled 309ebccf1e3SJoseph Koshyto file 31021ce09caSJoseph Koshy.Pa sample.stat , 311ebccf1e3SJoseph Koshyuse: 31200028966SRobert Watson.Dl "pmcstat -O sample.stat -n 32768 -S k7-retired-instructions" 313ebccf1e3SJoseph Koshy.Pp 314ebccf1e3SJoseph KoshyTo execute 315a2c0b3aeSJoseph Koshy.Nm firefox 316ebccf1e3SJoseph Koshyand measure the number of data cache misses suffered 317ebccf1e3SJoseph Koshyby it and its children every 12 seconds on an AMD Athlon, use: 318a2c0b3aeSJoseph Koshy.Dl "pmcstat -d -w 12 -p k7-dc-misses firefox" 3191fdbf256SJoseph Koshy.Pp 3202c79db51SJoseph KoshyTo measure instructions retired for all processes named 321fbd8b34aSJoseph Koshy.Dq emacs 322fbd8b34aSJoseph Koshyuse: 323fbd8b34aSJoseph Koshy.Dl "pmcstat -t '^emacs$' -p instructions" 324fbd8b34aSJoseph Koshy.Pp 3252c79db51SJoseph KoshyTo measure instructions retired for processes named 3262c79db51SJoseph Koshy.Dq emacs 3272c79db51SJoseph Koshyfor a period of 10 seconds use: 3282c79db51SJoseph Koshy.Dl "pmcstat -t '^emacs$' -p instructions sleep 10" 3292c79db51SJoseph Koshy.Pp 330ee4910b1SJoseph KoshyTo count instruction tlb-misses on CPUs 0 and 2 on a Intel 331ee4910b1SJoseph KoshyPentium Pro/Pentium III SMP system use: 332ee4910b1SJoseph Koshy.Dl "pmcstat -c 0,2 -s p6-itlb-miss" 333ee4910b1SJoseph Koshy.Pp 334b6010f9eSJoseph KoshyTo collect profiling information for a specific process with pid 1234 335b6010f9eSJoseph Koshybased on instruction cache misses seen by it use: 336b6010f9eSJoseph Koshy.Dl "pmcstat -P ic-misses -t 1234 -O /tmp/sample.out" 337b6010f9eSJoseph Koshy.Pp 338ee4910b1SJoseph KoshyTo perform system-wide sampling on all configured processors 339ee4910b1SJoseph Koshybased on processor instructions retired use: 3401fdbf256SJoseph Koshy.Dl "pmcstat -S instructions -O /tmp/sample.out" 341b6010f9eSJoseph KoshyIf callgraph capture is not desired use: 342b6010f9eSJoseph Koshy.Dl "pmcstat -N -S instructions -O /tmp/sample.out" 3431fdbf256SJoseph Koshy.Pp 344302cbb90SJoseph KoshyTo send the generated event log to a remote machine use: 345302cbb90SJoseph Koshy.Dl "pmcstat -S instructions -O remotehost:port" 346302cbb90SJoseph KoshyOn the remote machine, the sample log can be collected using 347302cbb90SJoseph Koshy.Xr nc 1 : 348302cbb90SJoseph Koshy.Dl "nc -l remotehost port > /tmp/sample.out" 349302cbb90SJoseph Koshy.Pp 3501fdbf256SJoseph KoshyTo generate 3511fdbf256SJoseph Koshy.Xr gprof 1 352b6010f9eSJoseph Koshycompatible profiles from a sample file use: 3531fdbf256SJoseph Koshy.Dl "pmcstat -R /tmp/sample.out -g" 354b6010f9eSJoseph Koshy.Pp 355b6010f9eSJoseph KoshyTo print a system-wide profile with callgraphs to file 356b6010f9eSJoseph Koshy.Pa "foo.graph" 357b6010f9eSJoseph Koshyuse: 358b6010f9eSJoseph Koshy.Dl "pmcstat -R /tmp/sample.out -G foo.graph" 359ebccf1e3SJoseph Koshy.Sh DIAGNOSTICS 360e572c7a7SJoseph KoshyIf option 361e572c7a7SJoseph Koshy.Fl v 362e572c7a7SJoseph Koshyis specified, 363e572c7a7SJoseph Koshy.Nm 364e572c7a7SJoseph Koshymay issue the following diagnostic messages: 365e572c7a7SJoseph Koshy.Bl -diag -width indent 366e572c7a7SJoseph Koshy.It "#callchain/dubious-frames" 367e572c7a7SJoseph KoshyThe number of callchain records that had an 368e572c7a7SJoseph Koshy.Dq impossible 369e572c7a7SJoseph Koshyvalue for a return address. 370e572c7a7SJoseph Koshy.It "#exec handling errors" 371e572c7a7SJoseph KoshyThe number of 372e572c7a7SJoseph Koshy.Xr exec 2 373e572c7a7SJoseph Koshyevents in the log file that named executables that could not be 374e572c7a7SJoseph Koshyanalyzed. 375e572c7a7SJoseph Koshy.It "#exec/elf" 376e572c7a7SJoseph KoshyThe number of 377e572c7a7SJoseph Koshy.Xr exec 2 378e572c7a7SJoseph Koshyevents that named ELF executables. 379e572c7a7SJoseph Koshy.It "#exec/unknown" 380e572c7a7SJoseph KoshyThe number of 381e572c7a7SJoseph Koshy.Xr exec 2 382e572c7a7SJoseph Koshyevents that named executables with unrecognized formats. 383e572c7a7SJoseph Koshy.It "#samples/total" 384e572c7a7SJoseph KoshyThe total number of samples in the log file. 385e572c7a7SJoseph Koshy.It "#samples/unclaimed" 386e572c7a7SJoseph KoshyThe number of samples that could not be correlated to a known 387e572c7a7SJoseph Koshyexecutable object (i.e., to an executable, shared library, the 388e572c7a7SJoseph Koshykernel or the runtime loader). 389e572c7a7SJoseph Koshy.It "#samples/unknown-object" 390e572c7a7SJoseph KoshyThe number of samples that were associated with an executable 391e572c7a7SJoseph Koshywith an unrecognized object format. 392e572c7a7SJoseph Koshy.El 393e572c7a7SJoseph Koshy.Pp 39421ce09caSJoseph Koshy.Ex -std 395b6010f9eSJoseph Koshy.Sh COMPATIBILITY 396b6010f9eSJoseph KoshyDue to the limitations of the 397b6010f9eSJoseph Koshy.Pa gmon.out 398b6010f9eSJoseph Koshyfile format, 399b6010f9eSJoseph Koshy.Xr gprof 1 400b6010f9eSJoseph Koshycompatible profiles generated by the 401b6010f9eSJoseph Koshy.Fl g 402b6010f9eSJoseph Koshyoption do not contain information about calls that cross executable 403b6010f9eSJoseph Koshyboundaries. 404b6010f9eSJoseph KoshyThe generated 405b6010f9eSJoseph Koshy.Pa gmon.out 406b6010f9eSJoseph Koshyfiles are also only meaningful for native executables. 407ebccf1e3SJoseph Koshy.Sh SEE ALSO 408f263522aSJoseph Koshy.Xr gprof 1 , 409302cbb90SJoseph Koshy.Xr nc 1 , 410ebccf1e3SJoseph Koshy.Xr execvp 3 , 411ebccf1e3SJoseph Koshy.Xr pmc 3 , 41221ce09caSJoseph Koshy.Xr pmclog 3 , 413ebccf1e3SJoseph Koshy.Xr hwpmc 4 , 414ebccf1e3SJoseph Koshy.Xr pmccontrol 8 , 415ebccf1e3SJoseph Koshy.Xr sysctl 8 41621ce09caSJoseph Koshy.Sh HISTORY 41721ce09caSJoseph KoshyThe 41821ce09caSJoseph Koshy.Nm 41921ce09caSJoseph Koshyutility first appeared in 42021ce09caSJoseph Koshy.Fx 6.0 . 4211fdbf256SJoseph KoshyIt is 4221fdbf256SJoseph Koshy.Ud 42321ce09caSJoseph Koshy.Sh AUTHORS 42421ce09caSJoseph Koshy.An Joseph Koshy Aq jkoshy@FreeBSD.org 4259f8adcefSJoseph Koshy.Sh BUGS 426bc84aa4bSRuslan ErmilovThe 4279f8adcefSJoseph Koshy.Nm 428bc84aa4bSRuslan Ermilovutility cannot yet analyse 429302cbb90SJoseph Koshy.Xr hwpmc 4 430302cbb90SJoseph Koshylogs generated by non-native architectures. 431