1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- This file documents the gprof profiler of the GNU system. 4 5Copyright (C) 1988-2021 Free Software Foundation, Inc. 6 7Permission is granted to copy, distribute and/or modify this document 8under the terms of the GNU Free Documentation License, Version 1.3 9or any later version published by the Free Software Foundation; 10with no Invariant Sections, with no Front-Cover Texts, and with no 11Back-Cover Texts. A copy of the license is included in the 12section entitled "GNU Free Documentation License". 13 --> 14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 15<head> 16<title>GNU gprof: Incompatibilities</title> 17 18<meta name="description" content="GNU gprof: Incompatibilities"> 19<meta name="keywords" content="GNU gprof: Incompatibilities"> 20<meta name="resource-type" content="document"> 21<meta name="distribution" content="global"> 22<meta name="Generator" content="makeinfo"> 23<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 24<link href="index.html#Top" rel="start" title="Top"> 25<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 26<link href="index.html#Top" rel="up" title="Top"> 27<link href="Details.html#Details" rel="next" title="Details"> 28<link href="How-do-I_003f.html#How-do-I_003f" rel="previous" title="How do I?"> 29<style type="text/css"> 30<!-- 31a.summary-letter {text-decoration: none} 32blockquote.smallquotation {font-size: smaller} 33div.display {margin-left: 3.2em} 34div.example {margin-left: 3.2em} 35div.indentedblock {margin-left: 3.2em} 36div.lisp {margin-left: 3.2em} 37div.smalldisplay {margin-left: 3.2em} 38div.smallexample {margin-left: 3.2em} 39div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 40div.smalllisp {margin-left: 3.2em} 41kbd {font-style:oblique} 42pre.display {font-family: inherit} 43pre.format {font-family: inherit} 44pre.menu-comment {font-family: serif} 45pre.menu-preformatted {font-family: serif} 46pre.smalldisplay {font-family: inherit; font-size: smaller} 47pre.smallexample {font-size: smaller} 48pre.smallformat {font-family: inherit; font-size: smaller} 49pre.smalllisp {font-size: smaller} 50span.nocodebreak {white-space:nowrap} 51span.nolinebreak {white-space:nowrap} 52span.roman {font-family:serif; font-weight:normal} 53span.sansserif {font-family:sans-serif; font-weight:normal} 54ul.no-bullet {list-style: none} 55--> 56</style> 57 58 59</head> 60 61<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 62<a name="Incompatibilities"></a> 63<div class="header"> 64<p> 65Next: <a href="Details.html#Details" accesskey="n" rel="next">Details</a>, Previous: <a href="How-do-I_003f.html#How-do-I_003f" accesskey="p" rel="previous">How do I?</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> 66</div> 67<hr> 68<a name="Incompatibilities-with-Unix-gprof"></a> 69<h2 class="chapter">8 Incompatibilities with Unix <code>gprof</code></h2> 70 71<p><small>GNU</small> <code>gprof</code> and Berkeley Unix <code>gprof</code> use the same data 72file <samp>gmon.out</samp>, and provide essentially the same information. But 73there are a few differences. 74</p> 75<ul> 76<li> <small>GNU</small> <code>gprof</code> uses a new, generalized file format with support 77for basic-block execution counts and non-realtime histograms. A magic 78cookie and version number allows <code>gprof</code> to easily identify 79new style files. Old BSD-style files can still be read. 80See <a href="File-Format.html#File-Format">Profiling Data File Format</a>. 81 82</li><li> For a recursive function, Unix <code>gprof</code> lists the function as a 83parent and as a child, with a <code>calls</code> field that lists the number 84of recursive calls. <small>GNU</small> <code>gprof</code> omits these lines and puts 85the number of recursive calls in the primary line. 86 87</li><li> When a function is suppressed from the call graph with ‘<samp>-e</samp>’, <small>GNU</small> 88<code>gprof</code> still lists it as a subroutine of functions that call it. 89 90</li><li> <small>GNU</small> <code>gprof</code> accepts the ‘<samp>-k</samp>’ with its argument 91in the form ‘<samp>from/to</samp>’, instead of ‘<samp>from to</samp>’. 92 93</li><li> In the annotated source listing, 94if there are multiple basic blocks on the same line, 95<small>GNU</small> <code>gprof</code> prints all of their counts, separated by commas. 96 97 98</li><li> The blurbs, field widths, and output formats are different. <small>GNU</small> 99<code>gprof</code> prints blurbs after the tables, so that you can see the 100tables without skipping the blurbs. 101</li></ul> 102 103 104 105 106</body> 107</html> 108