pahole: Iterate classes in the order specified in the command line:

Before we were using the rbtree and then we were traversing in
alphabetical order, not in the command line order, fix that.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2020-07-14 12:43:29 -03:00
parent 37a5c7c5ba
commit 210dffe0d1
1 changed files with 2 additions and 6 deletions

View File

@ -1490,13 +1490,9 @@ static enum load_steal_kind pahole_stealer(struct cu *cu,
goto dump_it;
}
struct str_node *pos;
struct rb_node *next = rb_first(&class_names->entries);
while (next) {
pos = rb_entry(next, struct str_node, rb_node);
next = rb_next(&pos->rb_node);
struct str_node *pos, *n;
strlist__for_each_entry_safe(class_names, pos, n) {
const char *sizeof_member = NULL; // Overriding sizeof(class)?
char *name = (char *)pos->s;
const char *args_open = strchr(name, '(');