notes

来自「基于4个mips核的noc设计」· 代码 · 共 439 行 · 第 1/2 页

TXT
439
字号
-C[symspec]	--exec-counts[=symspec]			Request output in the form of execution counts.			If "symspec" is present, include only symbols			selected by "symspec" in the execution count			listing.  If the option is specified multiple			times, the execution count listing includes			symbols selected by the union of all symspecs.-Z[symspec]	--no-exec-counts[=symspec]			Suppress output in the execution count listing.			If given without an argument, the listing is			suppressed completely.  With a "symspec", suppress			the selected symbols from the call-graph.  If the			option is specified multiple times, the union of			the selected symbols is suppressed.  This option			has lower precedence than --exec-counts.-i		--file-info			Print information about the profile files that			are read.  The information consists of the			number and types of records present in the			profile file.  Currently, a profile file can			contain any number and any combination of histogram,			call-graph, or basic-block count records.-s		--sum-x		--all-lines			This option affects annotated source output only.			By default, only the lines at the beginning of			a basic-block are annotated.  If this option is			specified, every line in a basic-block is annotated			by repeating the annotation for the first line.			This option is identical to tcov's "-a".-I dirs		--directory-path=dirs			This option affects annotated source output only.			Specifies the list of directories to be searched			for source files.  The argument "dirs" is a colon			separated list of directories.  By default, gprof			searches for source files relative to the current			working directory only.-z		--display-unused-functions-m num		--min-count=num			This option affects annotated source and execution			count output only.  Symbols that are executed			less than "num" times are suppressed.  For annotated			source output, suppressed symbols are marked			by five hash-marks (#####).  In an execution count			output, suppressed symbols do not appear at all.-L		--print-path			Normally, source filenames are printed with the path			component suppressed.  With this option, gprof			can be forced to print the full pathname of			source filenames.  The full pathname is determined			from symbolic debugging information in the image file			and is relative to the directory in which the compiler			was invoked.-y		--separate-files			This option affects annotated source output only.			Normally, gprof prints annotated source files			to standard-output.  If this option is specified,			annotated source for a file named "path/filename"			is generated in the file "filename-ann".  That is,			annotated output is {\em always\/} generated in			gprof's current working directory.  Care has to			be taken if a program consists of files that have			identical filenames, but distinct paths.-c		--static-call-graph-t num		--table-length=num			This option affects annotated source output only.			After annotating a source file, gprof generates			an execution count summary consisting of a table			of lines with the top execution counts.  By			default, this table is ten entries long.			This option can be used to change the table length			or, by specifying an argument value of 0, it can be			suppressed completely.-n symspec	--time=symspec			Only symbols selected by "symspec" are considered			in total and percentage time computations.			However, this option does not affect percentage time			computation for the flat profile.			If the option is specified multiple times, the union			of all selected symbols is used in time computations.-N		--no-time=symspec			Exclude the symbols selected by "symspec" from			total and percentage time computations.			However, this option does not affect percentage time			computation for the flat profile.			This option is ignored if any --time options are			specified.-w num		--width=num			Sets the output line width.  Currently, this option			affects the printing of the call-graph function index			only.-e		<no long form---for backwards compatibility only>-E		<no long form---for backwards compatibility only>-f		<no long form---for backwards compatibility only>-F		<no long form---for backwards compatibility only>-k		<no long form---for backwards compatibility only>-b		--brief-dnum		--debug[=num]-h		--help			Prints a usage message.-O name		--file-format=name			Selects the format of the profile data files.			Recognized formats are "auto", "bsd", "magic",			and "prof".  The last one is not yet supported.			Format "auto" attempts to detect the file format			automatically (this is the default behavior).			It attempts to read the profile data files as			"magic" files and if this fails, falls back to			the "bsd" format.  "bsd" forces gprof to read			the data files in the BSD format.  "magic" forces			gprof to read the data files in the "magic" format.-T		--traditional-v		--version** File Format ChangesThe old BSD-derived format used for profile data does not contain amagic cookie that allows to check whether a data file really is agprof file.  Furthermore, it does not provide a version number, thusrendering changes to the file format almost impossible.  GNU gprofuses a new file format that provides these features.  For backwardcompatibility, GNU gprof continues to support the old BSD-derivedformat, but not all features are supported with it.  For example,basic-block execution counts cannot be accommodated by the old fileformat.The new file format is defined in header file \file{gmon_out.h}.  Itconsists of a header containing the magic cookie and a version number,as well as some spare bytes available for future extensions.  All datain a profile data file is in the native format of the host on whichthe profile was collected.  GNU gprof adapts automatically to thebyte-order in use.In the new file format, the header is followed by a sequence ofrecords.  Currently, there are three different record types: histogramrecords, call-graph arc records, and basic-block execution countrecords.  Each file can contain any number of each record type.  Whenreading a file, GNU gprof will ensure records of the same type arecompatible with each other and compute the union of all records.  Forexample, for basic-block execution counts, the union is simply the sumof all execution counts for each basic-block.*** Histogram RecordsHistogram records consist of a header that is followed by an array ofbins.  The header contains the text-segment range that the histogramspans, the size of the histogram in bytes (unlike in the old BSDformat, this does not include the size of the header), the rate of theprofiling clock, and the physical dimension that the bin countsrepresent after being scaled by the profiling clock rate.  Thephysical dimension is specified in two parts: a long name of up to 15characters and a single character abbreviation.  For example, ahistogram representing real-time would specify the long name as"seconds" and the abbreviation as "s".  This feature is useful forarchitectures that support performance monitor hardware (which,fortunately, is becoming increasingly common).  For example, under DECOSF/1, the "uprofile" command can be used to produce a histogram of,say, instruction cache misses.  In this case, the dimension in thehistogram header could be set to "i-cache misses" and the abbreviationcould be set to "1" (because it is simply a count, not a physicaldimension).  Also, the profiling rate would have to be set to 1 inthis case.Histogram bins are 16-bit numbers and each bin represent an equalamount of text-space.  For example, if the text-segment is onethousand bytes long and if there are ten bins in the histogram, eachbin represents one hundred bytes.*** Call-Graph RecordsCall-graph records have a format that is identical to the one used inthe BSD-derived file format.  It consists of an arc in the call graphand a count indicating the number of times the arc was traversedduring program execution.  Arcs are specified by a pair of addresses:the first must be within caller's function and the second must bewithin the callee's function.  When performing profiling at thefunction level, these addresses can point anywhere within therespective function.  However, when profiling at the line-level, it isbetter if the addresses are as close to the call-site/entry-point aspossible.  This will ensure that the line-level call-graph is able toidentify exactly which line of source code performed calls to afunction.*** Basic-Block Execution Count RecordsBasic-block execution count records consist of a header followed by asequence of address/count pairs.  The header simply specifies thelength of the sequence.  In an address/count pair, the addressidentifies a basic-block and the count specifies the number of timesthat basic-block was executed.  Any address within the basic-address canbe used.IMPLEMENTATION NOTE: gcc -a can be used to instrument a program torecord basic-block execution counts.  However, the __bb_exit_func()that is currently present in libgcc2.c does not generate a gmon.outfile in a suiteable format.  This should be fixed for future releasesof gcc.  In the meantime, contact davidm@cs.arizona.edu for a versionof __bb_exit_func() to is appropriate.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?