Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210540
b: refs/heads/master
c: 85e00b5
h: refs/heads/master
v: v3
  • Loading branch information
Jovi Zhang authored and Arnaldo Carvalho de Melo committed Sep 9, 2010
1 parent 9eabc5d commit ae5f407
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e11637e2c929e34dcc0fbbfb48bdb638937701a
refs/heads/master: 85e00b55517a5696282b80836655e6b6f5702df0
6 changes: 3 additions & 3 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -5761,15 +5761,15 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
{
unsigned int cpu = (long)hcpu;

switch (action & ~CPU_TASKS_FROZEN) {
switch (action) {

case CPU_UP_PREPARE:
case CPU_DOWN_FAILED:
case CPU_UP_PREPARE_FROZEN:
perf_event_init_cpu(cpu);
break;

case CPU_UP_CANCELED:
case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN:
perf_event_exit_cpu(cpu);
break;

Expand Down
3 changes: 0 additions & 3 deletions trunk/kernel/trace/trace_event_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ int perf_trace_init(struct perf_event *p_event)
tp_event->class && tp_event->class->reg &&
try_module_get(tp_event->mod)) {
ret = perf_trace_event_init(tp_event, p_event);
if (ret)
module_put(tp_event->mod);
break;
}
}
Expand Down Expand Up @@ -148,7 +146,6 @@ void perf_trace_destroy(struct perf_event *p_event)
}
}
out:
module_put(tp_event->mod);
mutex_unlock(&event_mutex);
}

Expand Down
7 changes: 7 additions & 0 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2268,6 +2268,9 @@ static int setup_list(struct strlist **list, const char *list_str,

int symbol__init(void)
{
if (symbol_conf.initialized)
return 0;

elf_version(EV_CURRENT);
if (symbol_conf.sort_by_name)
symbol_conf.priv_size += (sizeof(struct symbol_name_rb_node) -
Expand All @@ -2293,6 +2296,7 @@ int symbol__init(void)
symbol_conf.sym_list_str, "symbol") < 0)
goto out_free_comm_list;

symbol_conf.initialized = true;
return 0;

out_free_dso_list:
Expand All @@ -2304,11 +2308,14 @@ int symbol__init(void)

void symbol__exit(void)
{
if (!symbol_conf.initialized)
return;
strlist__delete(symbol_conf.sym_list);
strlist__delete(symbol_conf.dso_list);
strlist__delete(symbol_conf.comm_list);
vmlinux_path__exit();
symbol_conf.sym_list = symbol_conf.dso_list = symbol_conf.comm_list = NULL;
symbol_conf.initialized = false;
}

int machines__create_kernel_maps(struct rb_root *self, pid_t pid)
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/util/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ struct symbol_conf {
show_nr_samples,
use_callchain,
exclude_other,
show_cpu_utilization;
show_cpu_utilization,
initialized;
const char *vmlinux_name,
*source_prefix,
*field_sep;
Expand Down

0 comments on commit ae5f407

Please sign in to comment.