From: Richard Allen Date: Sun, 16 Feb 2025 22:50:01 +0000 (-0600) Subject: gprof: rename min_insn_size to insn_boundary X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f19534f257eb2643624414c22aa5a32da39d7b66;p=thirdparty%2Fbinutils-gdb.git gprof: rename min_insn_size to insn_boundary This distinction is important for architecures like Xtensa, where 2B and 3B instructions are common, but the correct value for instruction iteration is 1B, not 2B. Signed-off-by: Richard Allen --- diff --git a/gprof/corefile.c b/gprof/corefile.c index 65d8ccf5476..bd8e60d4e68 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -36,7 +36,8 @@ static asymbol **core_syms; asection *core_text_sect; void * core_text_space; -static int min_insn_size; +/* Greatest common divisor of instruction sizes and alignments. */ +static int insn_boundary; int offset_to_code; /* For mapping symbols to specific .o files during file ordering. */ @@ -245,7 +246,7 @@ core_init (const char * aout_name) *symp = 0; } - min_insn_size = 1; + insn_boundary = 1; offset_to_code = 0; switch (bfd_get_arch (core_bfd)) @@ -255,7 +256,7 @@ core_init (const char * aout_name) break; case bfd_arch_alpha: - min_insn_size = 4; + insn_boundary = 4; break; default: @@ -791,7 +792,7 @@ core_create_line_syms (void) prev_line_num = 0; vma_high = core_text_sect->vma + bfd_section_size (core_text_sect); - for (vma = core_text_sect->vma; vma < vma_high; vma += min_insn_size) + for (vma = core_text_sect->vma; vma < vma_high; vma += insn_boundary) { unsigned int len; @@ -857,7 +858,7 @@ core_create_line_syms (void) lot cleaner now. */ prev = 0; - for (vma = core_text_sect->vma; vma < vma_high; vma += min_insn_size) + for (vma = core_text_sect->vma; vma < vma_high; vma += insn_boundary) { sym_init (ltab.limit);