Since we are in the gcc bashing mood anyway: Add two changes for

basic-block profiling:
1. use a .stabs(25) symbol to link all the data structures together with.
The regular method isn't safe for the kernel.
2. add a BB before the prologue and add a BB after the epilogue,  this
alows us to find the length of any counted BB.  This is a cheap and somewhat
reasonable measure of actual cost.
This commit is contained in:
phk 1995-03-10 08:24:09 +00:00
parent 52e927b2ae
commit 299cac41a2

View File

@ -333,6 +333,8 @@ end_final (filename)
ASM_OUTPUT_ALIGN (asm_out_file, align);
fprintf(asm_out_file,".stabs \"bbset\", 25, 0, 0, LPBX0\n");
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LPBX", 0);
/* zero word */
assemble_integer (const0_rtx, UNITS_PER_WORD, 1);
@ -902,6 +904,8 @@ final_start_function (first, file, optimize)
/* The Sun386i and perhaps other machines don't work right
if the profiling code comes after the prologue. */
if (profile_block_flag)
add_bb (file);
#ifdef PROFILE_BEFORE_PROLOGUE
if (profile_flag)
profile_function (file);
@ -1055,6 +1059,9 @@ final_end_function (first, file, optimize)
code to restore the stack frame and return to the caller. */
FUNCTION_EPILOGUE (file, get_frame_size ());
#endif
if (profile_block_flag)
add_bb (file);
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)