History

Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent

Ingo Molnar committed 16 years ago

Commit e1d4e082 parents 5e11637 85e00b52 files · +9 −1Browse files

Unified · Split

2 files
  1. tools/perf/util/symbol.c +7 −0
  2. tools/perf/util/symbol.h +2 −1
tools/perf/util/symbol.c+7−0
@@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str, · 2267 unmodified lines
22682268
22692269 int symbol__init(void)
22702270 {
2271+ if (symbol_conf.initialized)
2272+ return 0;
2273+
22712274 elf_version(EV_CURRENT);
22722275 if (symbol_conf.sort_by_name)
22732276 symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
@@ -2293,6 +2296,7 @@ int symbol__init(void) · 19 unmodified lines
22932296 symbol_conf.sym_list_str, "symbol") < 0)
22942297 goto out_free_comm_list;
22952298
2299+ symbol_conf.initialized = true;
22962300 return 0;
22972301
22982302 out_free_dso_list:
@@ -2304,11 +2308,14 @@ out_free_comm_list: · 5 unmodified lines
23042308
23052309 void symbol__exit(void)
23062310 {
2311+ if (!symbol_conf.initialized)
2312+ return;
23072313 strlist__delete(symbol_conf.sym_list);
23082314 strlist__delete(symbol_conf.dso_list);
23092315 strlist__delete(symbol_conf.comm_list);
23102316 vmlinux_path__exit();
23112317 symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
2318+ symbol_conf.initialized = false;
23122319 }
23132320
23142321 int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
tools/perf/util/symbol.h+2−1
@@ -69,7 +69,8 @@ struct symbol_conf { · 68 unmodified lines
6969 show_nr_samples,
7070 use_callchain,
7171 exclude_other,
72− show_cpu_utilization;
72+ show_cpu_utilization,
73+ initialized;
7374 const char *vmlinux_name,
7475 *source_prefix,
7576 *field_sep;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t