diff options
author | Jan Hubicka <jh@suse.cz> | 2001-12-06 12:49:46 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-12-06 11:49:46 +0000 |
commit | 8456b95a5af348aa220ad0adc2101835f221f5d3 (patch) | |
tree | 487983e5d02cf99f65e621df94291838c8f26701 /gcc/doc | |
parent | a39353e095675385b5fcc09039846eecf6383542 (diff) | |
download | gcc-8456b95a5af348aa220ad0adc2101835f221f5d3.zip gcc-8456b95a5af348aa220ad0adc2101835f221f5d3.tar.gz gcc-8456b95a5af348aa220ad0adc2101835f221f5d3.tar.bz2 |
final.c (count_basic_block, [...]): Kill.
* final.c (count_basic_block, add_bb, add_bb_string):
Kill.
(end_final, final_start_function, final, final_scan_insn,
leaf_function_p): Kill BB profiler related code.
* flags.h (profile_block_flag): Kill.
* libgcc2.c (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE,
BB_BUCKETS, BBINBUFSIZE, bb_edge, bb_func_mode, bb_func,
__bb, bb_src, bb_dst, bb_tracefile, bb_hashbuckets,
bb_func_head, bb_callcount, bb_mode, bb_stack, bb_stacksize
reported, GOPENDECOMPRESS, GOPENCOMPRESS, gopen, gclose,
__bb_exit_trace_func, __bb_init_prg, __bb_trace_func,
__bb_trace_func_ret, __bb_init_file, __bb_trace_ret,
__bb_init_trace_func): Kill.
* toplev.c (profile_block_flag): Kill.
(indepdendent_decode_option, process_options): Kill -a related code.
* alpha.c (direct_call_operand): Likewise.
* arm.c (arm_expand_prologue, thumb_expand_prologue,
thumb_expand_epilogue): Likewise.
* c4x.c (c4x_expand_prologue, c4x_null_epilogue_p): Likewise.
* c4x.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* d30v.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* fr30.c (fr30_expand_prologue): Kill BB profiler related code.
* i386.c (ix86_can_use_return_insn_p, ix86_expand_prologue,
ix86_expand_epilogue, ix86_expand_epilogue): Kill BB profiler related
code.
(ix86_output_function_block_profiler, ix86_output_block_profiler): Kill.
* i386.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* fr30.c (fr30_expand_prologue): Kill BB profiler related code.
* i960.c (i960_output_function_prologue): Kill BB profiler related
code.
* ia64.c (ia64_compute_frame_size): Likewise.
* ia64.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* m32r.c (m32r_expand_prolofue): Kill BB profiler related code.
* m68hc11.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* m68k.c (m68k_output_function_epilogue): Kill BB profiler related code.
* m68k.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* m88k.c (output_options, m88k_layout_frame, m88k_expand_prologue):
Kill BB profiler related code.
* m88k.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* mips.c (mips_expand_prologue): Kill BB profiler related code.
* mmix.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* rs6000.c (rs6000_override_options): Kill BB profiler related code.
* s960.c (s390_function_prologue): Kill BB profiler related code.
* s960.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* linux-aout.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* linux.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* linux64.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* sol2.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* sparc.c (sparc_override_options, eligible_for_sibcall_delay,
sparc_nonflat_function_epilogue): Kill BB profiler related code.
(sparc_function_block_profiler, sparc_block_profiler,
sparc_function_block_profiler_exit): Kill.
* sparc.h (OVERRIDE_OPTIONS): Kill BB profiler related code.
(FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* sun4o3.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* sunos4.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Kill.
* stormy16.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
* doc/invoke.texi: Kill documentation of -a and -ax.
* tm.texi (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER,
FUNCTION_BLOCK_PROFILER_EXIT, MACHINE_STATE_SAVE,
MACHINE_STATE_RESTORE): Kill.
From-SVN: r47712
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 76 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 169 |
2 files changed, 1 insertions, 244 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a6b02a4..e9175ec 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -240,7 +240,7 @@ in the following sections. @item Debugging Options @xref{Debugging Options,,Options for Debugging Your Program or GCC}. @gccoptlist{ --a -ax -d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol +-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol -fdump-unnumbered -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol -fdump-tree-original@r{[}-@var{n}@r{]} -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol @@ -2753,80 +2753,6 @@ pass when it finishes. Makes the compiler print some statistics about permanent memory allocation when it finishes. -@item -ax -@opindex ax -Generate extra code to profile basic blocks. Your executable will -produce output that is a superset of that produced when @option{-a} is -used. Additional output is the source and target address of the basic -blocks where a jump takes place, the number of times a jump is executed, -and (optionally) the complete sequence of basic blocks being executed. -The output is appended to file @file{bb.out}. - -You can examine different profiling aspects without recompilation. Your -executable will read a list of function names from file @file{bb.in}. -Profiling starts when a function on the list is entered and stops when -that invocation is exited. To exclude a function from profiling, prefix -its name with @samp{-}. If a function name is not unique, you can -disambiguate it by writing it in the form -@samp{/path/filename.d:functionname}. Your executable will write the -available paths and filenames in file @file{bb.out}. - -Several function names have a special meaning: -@table @code -@item __bb_jumps__ -Write source, target and frequency of jumps to file @file{bb.out}. -@item __bb_hidecall__ -Exclude function calls from frequency count. -@item __bb_showret__ -Include function returns in frequency count. -@item __bb_trace__ -Write the sequence of basic blocks executed to file @file{bbtrace.gz}. -The file will be compressed using the program @samp{gzip}, which must -exist in your @env{PATH}. On systems without the @samp{popen} -function, the file will be named @file{bbtrace} and will not be -compressed. @strong{Profiling for even a few seconds on these systems -will produce a very large file.} Note: @code{__bb_hidecall__} and -@code{__bb_showret__} will not affect the sequence written to -@file{bbtrace.gz}. -@end table - -Here's a short example using different profiling parameters -in file @file{bb.in}. Assume function @code{foo} consists of basic blocks -1 and 2 and is called twice from block 3 of function @code{main}. After -the calls, block 3 transfers control to block 4 of @code{main}. - -With @code{__bb_trace__} and @code{main} contained in file @file{bb.in}, -the following sequence of blocks is written to file @file{bbtrace.gz}: -0 3 1 2 1 2 4. The return from block 2 to block 3 is not shown, because -the return is to a point inside the block and not to the top. The -block address 0 always indicates, that control is transferred -to the trace from somewhere outside the observed functions. With -@samp{-foo} added to @file{bb.in}, the blocks of function -@code{foo} are removed from the trace, so only 0 3 4 remains. - -With @code{__bb_jumps__} and @code{main} contained in file @file{bb.in}, -jump frequencies will be written to file @file{bb.out}. The -frequencies are obtained by constructing a trace of blocks -and incrementing a counter for every neighbouring pair of blocks -in the trace. The trace 0 3 1 2 1 2 4 displays the following -frequencies: - -@example -Jump from block 0x0 to block 0x3 executed 1 time(s) -Jump from block 0x3 to block 0x1 executed 1 time(s) -Jump from block 0x1 to block 0x2 executed 2 time(s) -Jump from block 0x2 to block 0x1 executed 1 time(s) -Jump from block 0x2 to block 0x4 executed 1 time(s) -@end example - -With @code{__bb_hidecall__}, control transfer due to call instructions -is removed from the trace, that is the trace is cut into three parts: 0 -3 4, 0 1 2 and 0 1 2. With @code{__bb_showret__}, control transfer due -to return instructions is added to the trace. The trace becomes: 0 3 1 -2 3 1 2 3 4. Note, that this trace is not the same, as the sequence -written to @file{bbtrace.gz}. It is solely used for counting jump -frequencies. - @item -fprofile-arcs @opindex fprofile-arcs Instrument @dfn{arcs} during compilation to generate coverage data diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 7932811..67b78e6 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4039,175 +4039,6 @@ must not use the @var{labelno} argument to @code{FUNCTION_PROFILER}. Define this macro if the code for function profiling should come before the function prologue. Normally, the profiling code comes after. -@findex FUNCTION_BLOCK_PROFILER -@vindex profile_block_flag -@item FUNCTION_BLOCK_PROFILER (@var{file}, @var{labelno}) -A C statement or compound statement to output to @var{file} some -assembler code to initialize basic-block profiling for the current -object module. The global compile flag @code{profile_block_flag} -distinguishes two profile modes. - -@table @code -@findex __bb_init_func -@item profile_block_flag != 2 -Output code to call the subroutine @code{__bb_init_func} once per -object module, passing it as its sole argument the address of a block -allocated in the object module. - -The name of the block is a local symbol made with this statement: - -@smallexample -ASM_GENERATE_INTERNAL_LABEL (@var{buffer}, "LPBX", 0); -@end smallexample - -Of course, since you are writing the definition of -@code{ASM_GENERATE_INTERNAL_LABEL} as well as that of this macro, you -can take a short cut in the definition of this macro and use the name -that you know will result. - -The first word of this block is a flag which will be nonzero if the -object module has already been initialized. So test this word first, -and do not call @code{__bb_init_func} if the flag is -nonzero. @var{labelno} contains a unique number which may be used to -generate a label as a branch destination when @code{__bb_init_func} -will not be called. - -Described in assembler language, the code to be output looks like: - -@example - cmp (LPBX0),0 - bne local_label - parameter1 <- LPBX0 - call __bb_init_func -local_label: -@end example - -@findex __bb_init_trace_func -@item profile_block_flag == 2 -Output code to call the subroutine @code{__bb_init_trace_func} -and pass two parameters to it. The first parameter is the same as -for @code{__bb_init_func}. The second parameter is the number of the -first basic block of the function as given by @var{labelno}. Note -that @code{__bb_init_trace_func} has to be called, even if the object -module has been initialized already. - -Described in assembler language, the code to be output looks like: -@example -parameter1 <- LPBX0 -parameter2 <- @var{labelno} -call __bb_init_trace_func -@end example -@end table - -@findex BLOCK_PROFILER -@vindex profile_block_flag -@item BLOCK_PROFILER (@var{file}, @var{blockno}) -A C statement or compound statement to output to @var{file} some -assembler code to increment the count associated with the basic -block number @var{blockno}. The global compile flag -@code{profile_block_flag} distinguishes two profile modes. - -@table @code -@item profile_block_flag != 2 -Output code to increment the counter directly. Basic blocks are -numbered separately from zero within each compilation. The count -associated with block number @var{blockno} is at index -@var{blockno} in a vector of words; the name of this array is a local -symbol made with this statement: - -@smallexample -ASM_GENERATE_INTERNAL_LABEL (@var{buffer}, "LPBX", 2); -@end smallexample - -@c This paragraph is the same as one a few paragraphs up. -@c That is not an error. -Of course, since you are writing the definition of -@code{ASM_GENERATE_INTERNAL_LABEL} as well as that of this macro, you -can take a short cut in the definition of this macro and use the name -that you know will result. - -Described in assembler language, the code to be output looks like: - -@smallexample -inc (LPBX2+4*@var{blockno}) -@end smallexample - -@vindex __bb -@findex __bb_trace_func -@item profile_block_flag == 2 -Output code to initialize the global structure @code{__bb} and -call the function @code{__bb_trace_func}, which will increment the -counter. - -@code{__bb} consists of two words. In the first word, the current -basic block number, as given by @var{blockno}, has to be stored. In -the second word, the address of a block allocated in the object -module has to be stored. The address is given by the label created -with this statement: - -@smallexample -ASM_GENERATE_INTERNAL_LABEL (@var{buffer}, "LPBX", 0); -@end smallexample - -Described in assembler language, the code to be output looks like: -@example -move @var{blockno} -> (__bb) -move LPBX0 -> (__bb+4) -call __bb_trace_func -@end example -@end table - -@findex FUNCTION_BLOCK_PROFILER_EXIT -@findex __bb_trace_ret -@vindex profile_block_flag -@item FUNCTION_BLOCK_PROFILER_EXIT (@var{file}) -A C statement or compound statement to output to @var{file} assembler -code to call function @code{__bb_trace_ret}. The assembler code should -only be output if the global compile flag @code{profile_block_flag} == -2. This macro has to be used at every place where code for returning -from a function is generated (e.g.@: -@code{TARGET_ASM_FUNCTION_EPILOGUE}). Although you have to write the -definition of @code{TARGET_ASM_FUNCTION_EPILOGUE} as well, you have to -define this macro to tell the compiler, that the proper call to -@code{__bb_trace_ret} is produced. - -@findex MACHINE_STATE_SAVE -@findex __bb_init_trace_func -@findex __bb_trace_func -@findex __bb_trace_ret -@item MACHINE_STATE_SAVE (@var{id}) -A C statement or compound statement to save all registers, which may -be clobbered by a function call, including condition codes. The -@code{asm} statement will be mostly likely needed to handle this -task. Local labels in the assembler code can be concatenated with the -string @var{id}, to obtain a unique label name. - -Registers or condition codes clobbered by -@code{TARGET_ASM_FUNCTION_PROLOGUE} or -@code{TARGET_ASM_FUNCTION_EPILOGUE} must be saved in the macros -@code{FUNCTION_BLOCK_PROFILER}, @code{FUNCTION_BLOCK_PROFILER_EXIT} and -@code{BLOCK_PROFILER} prior calling @code{__bb_init_trace_func}, -@code{__bb_trace_ret} and @code{__bb_trace_func} respectively. - -@findex MACHINE_STATE_RESTORE -@findex __bb_init_trace_func -@findex __bb_trace_func -@findex __bb_trace_ret -@item MACHINE_STATE_RESTORE (@var{id}) -A C statement or compound statement to restore all registers, including -condition codes, saved by @code{MACHINE_STATE_SAVE}. - -Registers or condition codes clobbered by -@code{TARGET_ASM_FUNCTION_PROLOGUE} or -@code{TARGET_ASM_FUNCTION_EPILOGUE} must be restored in the macros -@code{FUNCTION_BLOCK_PROFILER}, @code{FUNCTION_BLOCK_PROFILER_EXIT} and -@code{BLOCK_PROFILER} after calling @code{__bb_init_trace_func}, -@code{__bb_trace_ret} and @code{__bb_trace_func} respectively. - -@findex BLOCK_PROFILER_CODE -@item BLOCK_PROFILER_CODE -A C function or functions which are needed in the library to -support block profiling. @findex TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER @item TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER |