aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-10-15 05:54:14 -0400
committerIngo Molnar <mingo@kernel.org>2014-10-15 05:54:14 -0400
commitec4212d88a77eb6caec10777ddd629b702a5ebbd (patch)
tree03b4b08df9d633e15df8c0ff27444324adf4a312 /tools/perf/ui
parent77654908ff1a58cee4886298968b5262884aff0b (diff)
parent2c241bd35e6f626ad6f867dcf9fefdc2315f125f (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: Infrastructure fixes and changes: * Fix off-by-one bugs in map->end handling (Stephane Eranian) * Fix off-by-one bug in maps__find(), also related to map->end handling (Namhyung Kim) * Make struct symbol->end be the first addr after the symbol range, to make it match the convention used for struct map->end. (Arnaldo Carvalho de Melo) * Fix perf_evlist__add_pollfd() error handling in 'perf kvm stat live' (Jiri Olsa) * Fix python test build by moving callchain_param to an object linked into the python binding (Jiri Olsa) * Do not include a struct hists per perf_evsel, untangling the histogram code from perf_evsel, to pave the way for exporting a minimalistic tools/lib/api/perf/ library usable by tools/perf and initially by the rasd daemon being developed by Borislav Petkov, Robert Richter and Jean Pihet. (Arnaldo Carvalho de Melo) * Make perf_evlist__open(evlist, NULL, NULL), i.e. without cpu and thread maps mean syswide monitoring, reducing the boilerplate for tools that only want system wide mode. (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browsers/header.c1
-rw-r--r--tools/perf/ui/browsers/hists.c20
-rw-r--r--tools/perf/ui/gtk/hists.c2
3 files changed, 14 insertions, 9 deletions
diff --git a/tools/perf/ui/browsers/header.c b/tools/perf/ui/browsers/header.c
index 89c16b988618..e8278c558d4a 100644
--- a/tools/perf/ui/browsers/header.c
+++ b/tools/perf/ui/browsers/header.c
@@ -1,6 +1,7 @@
1#include "util/cache.h" 1#include "util/cache.h"
2#include "util/debug.h" 2#include "util/debug.h"
3#include "ui/browser.h" 3#include "ui/browser.h"
4#include "ui/keysyms.h"
4#include "ui/ui.h" 5#include "ui/ui.h"
5#include "ui/util.h" 6#include "ui/util.h"
6#include "ui/libslang.h" 7#include "ui/libslang.h"
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 8f60a970404f..68eab9ea1634 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1229,12 +1229,14 @@ static int hists__browser_title(struct hists *hists, char *bf, size_t size)
1229 ev_name = buf; 1229 ev_name = buf;
1230 1230
1231 for_each_group_member(pos, evsel) { 1231 for_each_group_member(pos, evsel) {
1232 struct hists *pos_hists = evsel__hists(pos);
1233
1232 if (symbol_conf.filter_relative) { 1234 if (symbol_conf.filter_relative) {
1233 nr_samples += pos->hists.stats.nr_non_filtered_samples; 1235 nr_samples += pos_hists->stats.nr_non_filtered_samples;
1234 nr_events += pos->hists.stats.total_non_filtered_period; 1236 nr_events += pos_hists->stats.total_non_filtered_period;
1235 } else { 1237 } else {
1236 nr_samples += pos->hists.stats.nr_events[PERF_RECORD_SAMPLE]; 1238 nr_samples += pos_hists->stats.nr_events[PERF_RECORD_SAMPLE];
1237 nr_events += pos->hists.stats.total_period; 1239 nr_events += pos_hists->stats.total_period;
1238 } 1240 }
1239 } 1241 }
1240 } 1242 }
@@ -1387,7 +1389,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
1387 float min_pcnt, 1389 float min_pcnt,
1388 struct perf_session_env *env) 1390 struct perf_session_env *env)
1389{ 1391{
1390 struct hists *hists = &evsel->hists; 1392 struct hists *hists = evsel__hists(evsel);
1391 struct hist_browser *browser = hist_browser__new(hists); 1393 struct hist_browser *browser = hist_browser__new(hists);
1392 struct branch_info *bi; 1394 struct branch_info *bi;
1393 struct pstack *fstack; 1395 struct pstack *fstack;
@@ -1802,8 +1804,9 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
1802 struct perf_evsel_menu *menu = container_of(browser, 1804 struct perf_evsel_menu *menu = container_of(browser,
1803 struct perf_evsel_menu, b); 1805 struct perf_evsel_menu, b);
1804 struct perf_evsel *evsel = list_entry(entry, struct perf_evsel, node); 1806 struct perf_evsel *evsel = list_entry(entry, struct perf_evsel, node);
1807 struct hists *hists = evsel__hists(evsel);
1805 bool current_entry = ui_browser__is_current_entry(browser, row); 1808 bool current_entry = ui_browser__is_current_entry(browser, row);
1806 unsigned long nr_events = evsel->hists.stats.nr_events[PERF_RECORD_SAMPLE]; 1809 unsigned long nr_events = hists->stats.nr_events[PERF_RECORD_SAMPLE];
1807 const char *ev_name = perf_evsel__name(evsel); 1810 const char *ev_name = perf_evsel__name(evsel);
1808 char bf[256], unit; 1811 char bf[256], unit;
1809 const char *warn = " "; 1812 const char *warn = " ";
@@ -1818,7 +1821,8 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
1818 ev_name = perf_evsel__group_name(evsel); 1821 ev_name = perf_evsel__group_name(evsel);
1819 1822
1820 for_each_group_member(pos, evsel) { 1823 for_each_group_member(pos, evsel) {
1821 nr_events += pos->hists.stats.nr_events[PERF_RECORD_SAMPLE]; 1824 struct hists *pos_hists = evsel__hists(pos);
1825 nr_events += pos_hists->stats.nr_events[PERF_RECORD_SAMPLE];
1822 } 1826 }
1823 } 1827 }
1824 1828
@@ -1827,7 +1831,7 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
1827 unit, unit == ' ' ? "" : " ", ev_name); 1831 unit, unit == ' ' ? "" : " ", ev_name);
1828 slsmg_printf("%s", bf); 1832 slsmg_printf("%s", bf);
1829 1833
1830 nr_events = evsel->hists.stats.nr_events[PERF_RECORD_LOST]; 1834 nr_events = hists->stats.nr_events[PERF_RECORD_LOST];
1831 if (nr_events != 0) { 1835 if (nr_events != 0) {
1832 menu->lost_events = true; 1836 menu->lost_events = true;
1833 if (!current_entry) 1837 if (!current_entry)
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
index f3fa4258b256..fc654fb77ace 100644
--- a/tools/perf/ui/gtk/hists.c
+++ b/tools/perf/ui/gtk/hists.c
@@ -319,7 +319,7 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist,
319 gtk_container_add(GTK_CONTAINER(window), vbox); 319 gtk_container_add(GTK_CONTAINER(window), vbox);
320 320
321 evlist__for_each(evlist, pos) { 321 evlist__for_each(evlist, pos) {
322 struct hists *hists = &pos->hists; 322 struct hists *hists = evsel__hists(pos);
323 const char *evname = perf_evsel__name(pos); 323 const char *evname = perf_evsel__name(pos);
324 GtkWidget *scrolled_window; 324 GtkWidget *scrolled_window;
325 GtkWidget *tab_label; 325 GtkWidget *tab_label;