diff options
author | Richard Allen <rsaxvc@gmail.com> | 2025-02-16 16:50:01 -0600 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-03-01 11:17:13 +1030 |
commit | f19534f257eb2643624414c22aa5a32da39d7b66 (patch) | |
tree | 1af4e943b52b19aa481bc622648be38b9d4b7132 | |
parent | 50eeb3b1603785b7c7e01ba74041fe19ef2e137c (diff) | |
download | binutils-f19534f257eb2643624414c22aa5a32da39d7b66.zip binutils-f19534f257eb2643624414c22aa5a32da39d7b66.tar.gz binutils-f19534f257eb2643624414c22aa5a32da39d7b66.tar.bz2 |
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 <rsaxvc@gmail.com>
-rw-r--r-- | gprof/corefile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gprof/corefile.c b/gprof/corefile.c index 65d8ccf..bd8e60d 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); |