diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-05-14 11:09:02 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-28 16:24:00 +0300 |
commit | 27a0dcb7adb52473dd98d285a46b764b9219d303 (patch) | |
tree | 52deb89bf5ef67e3749b2e2a026837a76f93d3f2 /tools/perf/util | |
parent | 3a5714f8b58913ded4d9e90abdd30e7e5993f863 (diff) | |
download | linux-27a0dcb7adb52473dd98d285a46b764b9219d303.tar.bz2 |
perf hists: Move locking to its call-sites
It's a preparation patch to eliminate unneeded locking in the perf
report path.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1368497347-9628-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/hist.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 7e0fa628e9ab..b11a6cfdb414 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -347,8 +347,6 @@ static struct hist_entry *add_hist_entry(struct hists *hists, struct hist_entry *he; int cmp; - pthread_mutex_lock(&hists->lock); - p = &hists->entries_in->rb_node; while (*p != NULL) { @@ -394,14 +392,12 @@ static struct hist_entry *add_hist_entry(struct hists *hists, he = hist_entry__new(entry); if (!he) - goto out_unlock; + return NULL; rb_link_node(&he->rb_node_in, parent, p); rb_insert_color(&he->rb_node_in, hists->entries_in); out: hist_entry__add_cpumode_period(he, al->cpumode, period); -out_unlock: - pthread_mutex_unlock(&hists->lock); return he; } |