hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/tools/perf/util/symbol_fprintf.c
....@@ -3,6 +3,8 @@
33 #include <inttypes.h>
44 #include <stdio.h>
55
6
+#include "dso.h"
7
+#include "map.h"
68 #include "symbol.h"
79
810 size_t symbol__fprintf(struct symbol *sym, FILE *fp)
....@@ -64,7 +66,7 @@
6466 struct rb_node *nd;
6567 struct symbol_name_rb_node *pos;
6668
67
- for (nd = rb_first(&dso->symbol_names); nd; nd = rb_next(nd)) {
69
+ for (nd = rb_first_cached(&dso->symbol_names); nd; nd = rb_next(nd)) {
6870 pos = rb_entry(nd, struct symbol_name_rb_node, rb_node);
6971 ret += fprintf(fp, "%s\n", pos->sym.name);
7072 }