1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

Add the hooks that we use for our profiling extensions.

Obtained from: bde
This commit is contained in:
Peter Wemm 1996-09-18 06:47:49 +00:00
parent f7f03b3cbc
commit 7767f29ab5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18347

View File

@ -341,6 +341,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);
@ -914,6 +916,9 @@ final_start_function (first, file, optimize)
leaf_renumber_regs (first);
#endif
if (profile_block_flag)
add_bb (file);
/* The Sun386i and perhaps other machines don't work right
if the profiling code comes after the prologue. */
#ifdef PROFILE_BEFORE_PROLOGUE
@ -971,14 +976,18 @@ static void
profile_function (file)
FILE *file;
{
#ifndef NO_PROFILE_DATA
int align = MIN (BIGGEST_ALIGNMENT, POINTER_SIZE);
#endif /* not NO_PROFILE_DATA */
int sval = current_function_returns_struct;
int cxt = current_function_needs_context;
#ifndef NO_PROFILE_DATA
data_section ();
ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
assemble_integer (const0_rtx, POINTER_SIZE / BITS_PER_UNIT, 1);
#endif /* not NO_PROFILE_DATA */
text_section ();
@ -1066,6 +1075,9 @@ final_end_function (first, file, optimize)
FUNCTION_EPILOGUE (file, get_frame_size ());
#endif
if (profile_block_flag)
add_bb (file);
#ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG)
sdbout_end_epilogue ();