diff options
author | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2024-12-09 18:33:48 -0800 |
---|---|---|
committer | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2024-12-10 12:46:47 -0800 |
commit | ded4c0a10e93235f19e967551a717d9348ebb1d9 (patch) | |
tree | ddbd93e57200555d140a117ff1b82689dfde06b4 /gprofng/src | |
parent | ba8b77eec15a26a6da11e9f1ef058ddca0af1b5d (diff) | |
download | binutils-ded4c0a10e93235f19e967551a717d9348ebb1d9.zip binutils-ded4c0a10e93235f19e967551a717d9348ebb1d9.tar.gz binutils-ded4c0a10e93235f19e967551a717d9348ebb1d9.tar.bz2 |
gprofng: fix sorting in Hist_data::sort
If the '-name soname' option is used, the fake '<Total>' function is expanded
with the name loadobject.
gprofng/ChangeLog
2024-12-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
* src/Hist_data.cc (Hist_data::sort): Fix sorting.
Diffstat (limited to 'gprofng/src')
-rw-r--r-- | gprofng/src/Hist_data.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gprofng/src/Hist_data.cc b/gprofng/src/Hist_data.cc index fb72901..35d1f86 100644 --- a/gprofng/src/Hist_data.cc +++ b/gprofng/src/Hist_data.cc @@ -521,12 +521,11 @@ Hist_data::sort (long ind, bool reverse) hist_items->sort ((CompareFunc) sort_compare_all, this); // ensure that <Total> comes first/last - char *tname = NTXT ("<Total>"); for (int i = 0; i < hist_items->size (); ++i) { HistItem *hi = hist_items->fetch (i); char *name = hi->obj->get_name (); - if (name != NULL && streq (name, tname)) + if (name != NULL && strncmp (name, "<Total>", 7) == 0) { int idx0 = rev_sort ? hist_items->size () - 1 : 0; if (i != idx0) |