* [PATCH 1/4] gprof: add missing newline to error text
@ 2025-02-09 16:48 Richard Allen
2025-02-09 16:48 ` [PATCH 2/4] gprof: fix comment typos Richard Allen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Richard Allen @ 2025-02-09 16:48 UTC (permalink / raw)
To: binutils; +Cc: Richard Allen
Signed-off-by: Richard Allen <rsaxvc@gmail.com>
---
gprof/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gprof/hist.c b/gprof/hist.c
index a8413d4e4aa..36393ef3b68 100644
--- a/gprof/hist.c
+++ b/gprof/hist.c
@@ -155,7 +155,7 @@ read_histogram_header (histogram *record,
if (fabs (hist_scale - n_hist_scale) > 0.000001)
{
fprintf (stderr,
- _("%s: different scales in histogram records"),
+ _("%s: different scales in histogram records\n"),
whoami);
done (1);
}
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] gprof: fix comment typos
2025-02-09 16:48 [PATCH 1/4] gprof: add missing newline to error text Richard Allen
@ 2025-02-09 16:48 ` Richard Allen
2025-02-09 16:49 ` [PATCH 3/4] gprof: print values of mismatched histogram scales Richard Allen
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Richard Allen @ 2025-02-09 16:48 UTC (permalink / raw)
To: binutils; +Cc: Richard Allen
Signed-off-by: Richard Allen <rsaxvc@gmail.com>
---
gprof/hist.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gprof/hist.c b/gprof/hist.c
index 36393ef3b68..c87a5de6b1d 100644
--- a/gprof/hist.c
+++ b/gprof/hist.c
@@ -114,7 +114,7 @@ read_histogram_header (histogram *record,
if (first)
{
- /* We don't try to veryfy profrate is the same for all histogram
+ /* We don't try to verify profrate is the same for all histogram
records. If we have two histogram records for the same
address range and profiling samples is done as often
as possible as opposed on timer, then the actual profrate will
@@ -443,7 +443,7 @@ hist_assign_samples_1 (histogram *r)
total_time));
}
-/* Calls 'hist_assign_sampes_1' for all histogram records read so far. */
+/* Calls 'hist_assign_samples_1' for all histogram records read so far. */
void
hist_assign_samples (void)
{
@@ -724,7 +724,7 @@ hist_clip_symbol_address (bfd_vma *p_lowpc, bfd_vma *p_highpc)
*p_highpc = *p_lowpc;
}
-/* Find and return exising histogram record having the same lowpc and
+/* Find and return existing histogram record having the same lowpc and
highpc as passed via the parameters. Return NULL if nothing is found.
The return value is valid until any new histogram is read. */
static histogram *
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] gprof: print values of mismatched histogram scales
2025-02-09 16:48 [PATCH 1/4] gprof: add missing newline to error text Richard Allen
2025-02-09 16:48 ` [PATCH 2/4] gprof: fix comment typos Richard Allen
@ 2025-02-09 16:49 ` Richard Allen
2025-02-09 16:49 ` [PATCH 4/4] gprof: fix odd inst len hist scale calculation Richard Allen
2025-02-09 22:29 ` [PATCH 1/4] gprof: add missing newline to error text Alan Modra
3 siblings, 0 replies; 5+ messages in thread
From: Richard Allen @ 2025-02-09 16:49 UTC (permalink / raw)
To: binutils; +Cc: Richard Allen
Signed-off-by: Richard Allen <rsaxvc@gmail.com>
---
gprof/hist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gprof/hist.c b/gprof/hist.c
index c87a5de6b1d..1193b7025e9 100644
--- a/gprof/hist.c
+++ b/gprof/hist.c
@@ -155,8 +155,8 @@ read_histogram_header (histogram *record,
if (fabs (hist_scale - n_hist_scale) > 0.000001)
{
fprintf (stderr,
- _("%s: different scales in histogram records\n"),
- whoami);
+ _("%s: different scales in histogram records: %f != %f\n"),
+ whoami, hist_scale, n_hist_scale);
done (1);
}
}
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] gprof: fix odd inst len hist scale calculation
2025-02-09 16:48 [PATCH 1/4] gprof: add missing newline to error text Richard Allen
2025-02-09 16:48 ` [PATCH 2/4] gprof: fix comment typos Richard Allen
2025-02-09 16:49 ` [PATCH 3/4] gprof: print values of mismatched histogram scales Richard Allen
@ 2025-02-09 16:49 ` Richard Allen
2025-02-09 22:29 ` [PATCH 1/4] gprof: add missing newline to error text Alan Modra
3 siblings, 0 replies; 5+ messages in thread
From: Richard Allen @ 2025-02-09 16:49 UTC (permalink / raw)
To: binutils; +Cc: Richard Allen
With even instruction sizes, this rounding never truncated.
Xtensa CPUs mostly use 2-3 byte instructions, and this can lead
to a histogram being captured with an odd length address range.
This small truncation prevented gprof from parsing gmon.out files
containing multiple histograms when at least one of them has an
odd address range length and another has any other address range.
Signed-off-by: Richard Allen <rsaxvc@gmail.com>
---
gprof/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gprof/hist.c b/gprof/hist.c
index 1193b7025e9..c82b5cd4db7 100644
--- a/gprof/hist.c
+++ b/gprof/hist.c
@@ -109,7 +109,7 @@ read_histogram_header (histogram *record,
done (1);
}
- n_hist_scale = (double)((record->highpc - record->lowpc) / sizeof (UNIT))
+ n_hist_scale = (double)(record->highpc - record->lowpc) / sizeof (UNIT)
/ record->num_bins;
if (first)
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] gprof: add missing newline to error text
2025-02-09 16:48 [PATCH 1/4] gprof: add missing newline to error text Richard Allen
` (2 preceding siblings ...)
2025-02-09 16:49 ` [PATCH 4/4] gprof: fix odd inst len hist scale calculation Richard Allen
@ 2025-02-09 22:29 ` Alan Modra
3 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2025-02-09 22:29 UTC (permalink / raw)
To: Richard Allen; +Cc: binutils
Thanks, I've pushed the series.
--
Alan Modra
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-09 22:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-09 16:48 [PATCH 1/4] gprof: add missing newline to error text Richard Allen
2025-02-09 16:48 ` [PATCH 2/4] gprof: fix comment typos Richard Allen
2025-02-09 16:49 ` [PATCH 3/4] gprof: print values of mismatched histogram scales Richard Allen
2025-02-09 16:49 ` [PATCH 4/4] gprof: fix odd inst len hist scale calculation Richard Allen
2025-02-09 22:29 ` [PATCH 1/4] gprof: add missing newline to error text Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).