linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location
@ 2015-09-04 14:45 kan.liang
  2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: kan.liang @ 2015-09-04 14:45 UTC (permalink / raw)
  To: acme; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

Add processor socket id info in hist_entry and addr_location.
For perf report, the socket id info is from perf.data.
For others, the socket id info is from current system.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/builtin-report.c | 4 ++++
 tools/perf/util/event.c     | 1 +
 tools/perf/util/hist.c      | 1 +
 tools/perf/util/sort.h      | 1 +
 tools/perf/util/symbol.h    | 1 +
 5 files changed, 8 insertions(+)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 62b285e..affd70d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -149,6 +149,7 @@ static int process_sample_event(struct perf_tool *tool,
 		.add_entry_cb 		= hist_iter__report_callback,
 	};
 	int ret = 0;
+	struct perf_env *env = evsel->evlist->env;
 
 	if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
 		pr_debug("problem processing %d event, skipping it.\n",
@@ -156,6 +157,9 @@ static int process_sample_event(struct perf_tool *tool,
 		return -1;
 	}
 
+	/* read socket id from perf.data for perf report */
+	al.socket = env->cpu[al.cpu].socket_id;
+
 	if (rep->hide_unresolved && al.sym == NULL)
 		goto out_put;
 
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 7ff6127..0bf8c98 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1021,6 +1021,7 @@ int perf_event__preprocess_sample(const union perf_event *event,
 
 	al->sym = NULL;
 	al->cpu = sample->cpu;
+	al->socket = cpu_map__get_socket_id(al->cpu);
 
 	if (al->map) {
 		struct dso *dso = al->map->dso;
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 08b6cd9..80c4683 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -452,6 +452,7 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
 			.map	= al->map,
 			.sym	= al->sym,
 		},
+		.socket	 = al->socket,
 		.cpu	 = al->cpu,
 		.cpumode = al->cpumode,
 		.ip	 = al->addr,
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 3c2a399..7cf1cf7 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -90,6 +90,7 @@ struct hist_entry {
 	struct comm		*comm;
 	u64			ip;
 	u64			transaction;
+	s32			socket;
 	s32			cpu;
 	u8			cpumode;
 
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 440ba8a..40073c6 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -191,6 +191,7 @@ struct addr_location {
 	u8	      filtered;
 	u8	      cpumode;
 	s32	      cpu;
+	s32	      socket;
 };
 
 struct symsrc {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
@ 2015-09-04 14:45 ` kan.liang
  2015-09-04 22:41   ` Arnaldo Carvalho de Melo
  2015-09-15  7:05   ` [tip:perf/core] perf tools: Introduce new sort type "socket" for the processor socket tip-bot for Kan Liang
  2015-09-04 14:45 ` [PATCH 3/5] perf,report: introduce socket-filter option kan.liang
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 17+ messages in thread
From: kan.liang @ 2015-09-04 14:45 UTC (permalink / raw)
  To: acme; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

This patch enable perf report to sort by processor socket

$ perf report --stdio --sort socket,comm,dso,symbol
 # To display the perf.data header info, please use
 --header/--header-only options.
 #
 #
 # Total Lost Samples: 0
 #
 # Samples: 686  of event 'cycles'
 # Event count (approx.): 349215462
 #
 # Overhead  SOCKET  Command    Shared Object     Symbol
 # ........  ......  .........  ................
 .................................
 #
    97.05%     000  test       test              [.] plusB_c
     0.98%     000  test       test              [.] plusA_c
     0.93%     001  perf       [kernel.vmlinux]  [k]
smp_call_function_single
     0.19%     001  perf       [kernel.vmlinux]  [k] page_fault
     0.19%     001  swapper    [kernel.vmlinux]  [k] pm_qos_request
     0.16%     000  test       [kernel.vmlinux]  [k] add_mm_counter_fast

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/Documentation/perf-report.txt |  3 ++-
 tools/perf/util/hist.h                   |  1 +
 tools/perf/util/sort.c                   | 22 ++++++++++++++++++++++
 tools/perf/util/sort.h                   |  1 +
 4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 9c7981b..92361a7 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -68,7 +68,7 @@ OPTIONS
 --sort=::
 	Sort histogram entries by given key(s) - multiple keys can be specified
 	in CSV format.  Following sort keys are available:
-	pid, comm, dso, symbol, parent, cpu, srcline, weight, local_weight.
+	pid, comm, dso, symbol, parent, cpu, socket, srcline, weight, local_weight.
 
 	Each key has following meaning:
 
@@ -79,6 +79,7 @@ OPTIONS
 	- parent: name of function matched to the parent regex filter. Unmatched
 	entries are displayed as "[other]".
 	- cpu: cpu number the task ran at the time of sample
+	- socket: processor socket number the task ran at the time of sample
 	- srcline: filename and line number executed at the time of sample.  The
 	DWARF debugging info must be provided.
 	- srcfile: file name of the source file of the same. Requires dwarf
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index de6d58e..5d04d28 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -29,6 +29,7 @@ enum hist_column {
 	HISTC_COMM,
 	HISTC_PARENT,
 	HISTC_CPU,
+	HISTC_SOCKET,
 	HISTC_SRCLINE,
 	HISTC_SRCFILE,
 	HISTC_MISPREDICT,
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index a97bcee..c4a32b9 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -421,6 +421,27 @@ struct sort_entry sort_cpu = {
 	.se_width_idx	= HISTC_CPU,
 };
 
+/* --sort socket */
+
+static int64_t
+sort__socket_cmp(struct hist_entry *left, struct hist_entry *right)
+{
+	return right->socket - left->socket;
+}
+
+static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf,
+				    size_t size, unsigned int width)
+{
+	return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket);
+}
+
+struct sort_entry sort_socket = {
+	.se_header      = "SOCKET",
+	.se_cmp	        = sort__socket_cmp,
+	.se_snprintf    = hist_entry__socket_snprintf,
+	.se_width_idx	= HISTC_SOCKET,
+};
+
 /* sort keys for branch stacks */
 
 static int64_t
@@ -1248,6 +1269,7 @@ static struct sort_dimension common_sort_dimensions[] = {
 	DIM(SORT_SYM, "symbol", sort_sym),
 	DIM(SORT_PARENT, "parent", sort_parent),
 	DIM(SORT_CPU, "cpu", sort_cpu),
+	DIM(SORT_SOCKET, "socket", sort_socket),
 	DIM(SORT_SRCLINE, "srcline", sort_srcline),
 	DIM(SORT_SRCFILE, "srcfile", sort_srcfile),
 	DIM(SORT_LOCAL_WEIGHT, "local_weight", sort_local_weight),
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 7cf1cf7..654ac8a 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -173,6 +173,7 @@ enum sort_type {
 	SORT_SYM,
 	SORT_PARENT,
 	SORT_CPU,
+	SORT_SOCKET,
 	SORT_SRCLINE,
 	SORT_SRCFILE,
 	SORT_LOCAL_WEIGHT,
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/5] perf,report: introduce socket-filter option
  2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
  2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
@ 2015-09-04 14:45 ` kan.liang
  2015-09-15  7:05   ` [tip:perf/core] perf report: Introduce --socket-filter option tip-bot for Kan Liang
  2015-09-04 14:45 ` [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: kan.liang @ 2015-09-04 14:45 UTC (permalink / raw)
  To: acme; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

Introduce --socket-filter option for perf report to only show processor
socket that match with this filter.

 perf report --socket-filter 1 --stdio
 # To display the perf.data header info, please use
 --header/--header-only options.
 #
 #
 # Total Lost Samples: 0
 #
 # Samples: 752  of event 'cycles'
 # Event count (approx.): 350995599
 # Processor Socket: 1
 #
 # Overhead  Command    Shared Object     Symbol
 # ........  .........  ................
 .................................
 #
    97.02%  test       test              [.] plusB_c
     0.97%  test       test              [.] plusA_c
     0.23%  swapper    [kernel.vmlinux]  [k] acpi_idle_do_entry
     0.09%  rcu_sched  [kernel.vmlinux]  [k]
dyntick_save_progress_counter
     0.01%  swapper    [kernel.vmlinux]  [k] task_waking_fair
     0.00%  swapper    [kernel.vmlinux]  [k] run_timer_softirq

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/Documentation/perf-report.txt |  3 +++
 tools/perf/builtin-report.c              | 11 +++++++++++
 tools/perf/ui/browsers/hists.c           |  4 ++++
 tools/perf/util/hist.c                   | 16 ++++++++++++++++
 tools/perf/util/hist.h                   |  4 +++-
 5 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 92361a7..b941d5e 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -350,6 +350,9 @@ include::itrace.txt[]
 	This option extends the perf report to show reference callgraphs,
 	which collected by reference event, in no callgraph event.
 
+--socket-filter::
+	Only report the samples on the processor socket that match with this filter
+
 include::callchain-overhead-calculation.txt[]
 
 SEE ALSO
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index affd70d..4b43245 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -62,6 +62,7 @@ struct report {
 	float			min_percent;
 	u64			nr_entries;
 	u64			queue_size;
+	int			socket_filter;
 	DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS);
 };
 
@@ -290,6 +291,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	struct perf_evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
+	int socket = hists->socket_filter;
 
 	if (symbol_conf.filter_relative) {
 		nr_samples = hists->stats.nr_non_filtered_samples;
@@ -330,6 +332,10 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 		ret += fprintf(fp, "\n# Sort order   : %s", sort_order ? : default_mem_sort_order);
 	} else
 		ret += fprintf(fp, "\n# Event count (approx.): %" PRIu64, nr_events);
+
+	if (socket > -1)
+		ret += fprintf(fp, "\n# Processor Socket: %d", socket);
+
 	return ret + fprintf(fp, "\n#\n");
 }
 
@@ -454,6 +460,8 @@ static void report__collapse_hists(struct report *rep)
 		if (pos->idx == 0)
 			hists->symbol_filter_str = rep->symbol_filter_str;
 
+		hists->socket_filter = rep->socket_filter;
+
 		hists__collapse_resort(hists, &prog);
 
 		/* Non-group events are considered as leader */
@@ -639,6 +647,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 		.max_stack		 = PERF_MAX_STACK_DEPTH,
 		.pretty_printing_style	 = "normal",
+		.socket_filter		 = -1,
 	};
 	const struct option options[] = {
 	OPT_STRING('i', "input", &input_name, "file",
@@ -751,6 +760,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 			"Show full source file name path for source lines"),
 	OPT_BOOLEAN(0, "show-ref-call-graph", &symbol_conf.show_ref_callgraph,
 		    "Show callgraph from reference event"),
+	OPT_INTEGER(0, "socket-filter", &report.socket_filter,
+		    "only show processor socket that match with this filter"),
 	OPT_END()
 	};
 	struct perf_data_file file = {
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index cf86f2d..457f24c 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1261,6 +1261,7 @@ static int hists__browser_title(struct hists *hists,
 	int printed;
 	const struct dso *dso = hists->dso_filter;
 	const struct thread *thread = hists->thread_filter;
+	int socket = hists->socket_filter;
 	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
 	u64 nr_events = hists->stats.total_period;
 	struct perf_evsel *evsel = hists_to_evsel(hists);
@@ -1314,6 +1315,9 @@ static int hists__browser_title(struct hists *hists,
 	if (dso)
 		printed += scnprintf(bf + printed, size - printed,
 				    ", DSO: %s", dso->short_name);
+	if (socket > -1)
+		printed += scnprintf(bf + printed, size - printed,
+				    ", Processor Socket: %d", socket);
 	if (!is_report_browser(hbt)) {
 		struct perf_top *top = hbt->arg;
 
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 80c4683..d7e53c2 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -15,6 +15,8 @@ static bool hists__filter_entry_by_thread(struct hists *hists,
 					  struct hist_entry *he);
 static bool hists__filter_entry_by_symbol(struct hists *hists,
 					  struct hist_entry *he);
+static bool hists__filter_entry_by_socket(struct hists *hists,
+					  struct hist_entry *he);
 
 u16 hists__col_len(struct hists *hists, enum hist_column col)
 {
@@ -1025,6 +1027,7 @@ static void hists__apply_filters(struct hists *hists, struct hist_entry *he)
 	hists__filter_entry_by_dso(hists, he);
 	hists__filter_entry_by_thread(hists, he);
 	hists__filter_entry_by_symbol(hists, he);
+	hists__filter_entry_by_socket(hists, he);
 }
 
 void hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
@@ -1293,6 +1296,18 @@ void hists__filter_by_symbol(struct hists *hists)
 	}
 }
 
+static bool hists__filter_entry_by_socket(struct hists *hists,
+					  struct hist_entry *he)
+{
+	if ((hists->socket_filter > -1) &&
+	    (he->socket != hists->socket_filter)) {
+		he->filtered |= (1 << HIST_FILTER__SOCKET);
+		return true;
+	}
+
+	return false;
+}
+
 void events_stats__inc(struct events_stats *stats, u32 type)
 {
 	++stats->nr_events[0];
@@ -1518,6 +1533,7 @@ static int hists_evsel__init(struct perf_evsel *evsel)
 	hists->entries_collapsed = RB_ROOT;
 	hists->entries = RB_ROOT;
 	pthread_mutex_init(&hists->lock, NULL);
+	hists->socket_filter = -1;
 	return 0;
 }
 
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 5d04d28..ef682f2 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -20,6 +20,7 @@ enum hist_filter {
 	HIST_FILTER__SYMBOL,
 	HIST_FILTER__GUEST,
 	HIST_FILTER__HOST,
+	HIST_FILTER__SOCKET,
 };
 
 enum hist_column {
@@ -71,6 +72,7 @@ struct hists {
 	struct events_stats	stats;
 	u64			event_stream;
 	u16			col_len[HISTC_NR_COLS];
+	int			socket_filter;
 };
 
 struct hist_entry_iter;
@@ -149,7 +151,7 @@ void hists__filter_by_symbol(struct hists *hists);
 static inline bool hists__has_filter(struct hists *hists)
 {
 	return hists->thread_filter || hists->dso_filter ||
-		hists->symbol_filter_str;
+		hists->symbol_filter_str || (hists->socket_filter > -1);
 }
 
 u16 hists__col_len(struct hists *hists, enum hist_column col);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/5] perf,tools: zoom in/out for processor socket
  2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
  2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
  2015-09-04 14:45 ` [PATCH 3/5] perf,report: introduce socket-filter option kan.liang
@ 2015-09-04 14:45 ` kan.liang
  2015-09-04 22:09   ` Andi Kleen
  2015-09-15  7:06   ` [tip:perf/core] perf hists browser: Zoom in/ out " tip-bot for Kan Liang
  2015-09-04 14:45 ` [PATCH 5/5] perf,test: test hists socket filter kan.liang
  2015-09-15  7:05 ` [tip:perf/core] perf tools: Add processor socket info to hist_entry and addr_location tip-bot for Kan Liang
  4 siblings, 2 replies; 17+ messages in thread
From: kan.liang @ 2015-09-04 14:45 UTC (permalink / raw)
  To: acme; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

Currently, users can zoom in/out for threads and dso in perf top and
report. This patch extends it for socket.
'S' is the short key to zoom into current Processor Socket.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/ui/browsers/hists.c | 43 +++++++++++++++++++++++++++++++++++++++++-
 tools/perf/util/hist.c         | 19 +++++++++++++++++++
 tools/perf/util/hist.h         |  1 +
 3 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 457f24c..d695fd2 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1429,6 +1429,7 @@ struct popup_action {
 	struct thread 		*thread;
 	struct dso		*dso;
 	struct map_symbol 	ms;
+	int			socket;
 
 	int (*fn)(struct hist_browser *browser, struct popup_action *act);
 };
@@ -1676,6 +1677,37 @@ add_exit_opt(struct hist_browser *browser __maybe_unused,
 	return 1;
 }
 
+static int
+do_zoom_socket(struct hist_browser *browser, struct popup_action *act)
+{
+	if (browser->hists->socket_filter > -1)
+		browser->hists->socket_filter = -1;
+	else
+		browser->hists->socket_filter = act->socket;
+
+	perf_hpp__set_elide(HISTC_SOCKET, false);
+	hists__filter_by_socket(browser->hists);
+	hist_browser__reset(browser);
+	return 0;
+}
+
+static int
+add_socket_opt(struct hist_browser *browser, struct popup_action *act,
+	       char **optstr, int socket)
+{
+	if (socket < 0)
+		return 0;
+
+	if (asprintf(optstr, "Zoom %s Processor Socket %d",
+		     (browser->hists->socket_filter > -1) ? "out of" : "into",
+		     socket) < 0)
+		return 0;
+
+	act->socket = socket;
+	act->fn = do_zoom_socket;
+	return 1;
+}
+
 static void hist_browser__update_nr_entries(struct hist_browser *hb)
 {
 	u64 nr_entries = 0;
@@ -1729,6 +1761,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	"E             Expand all callchains\n"				\
 	"F             Toggle percentage of filtered entries\n"		\
 	"H             Display column headers\n"			\
+	"S             Zoom into current Processor Socket\n"		\
 
 	/* help messages are sorted by lexical order of the hotkey */
 	const char report_help[] = HIST_BROWSER_HELP_COMMON
@@ -1778,6 +1811,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		struct thread *thread = NULL;
 		struct dso *dso = NULL;
 		int choice = 0;
+		int socket = -1;
 
 		nr_options = 0;
 
@@ -1786,6 +1820,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		if (browser->he_selection != NULL) {
 			thread = hist_browser__selected_thread(browser);
 			dso = browser->selection->map ? browser->selection->map->dso : NULL;
+			socket = browser->he_selection->socket;
 		}
 		switch (key) {
 		case K_TAB:
@@ -1828,6 +1863,10 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 			actions->thread = thread;
 			do_zoom_thread(browser, actions);
 			continue;
+		case 'S':
+			actions->socket = socket;
+			do_zoom_socket(browser, actions);
+			continue;
 		case '/':
 			if (ui_browser__input_window("Symbol to show",
 					"Please enter the name of symbol you want to see",
@@ -1973,7 +2012,9 @@ skip_annotation:
 		nr_options += add_map_opt(browser, &actions[nr_options],
 					  &options[nr_options],
 					  browser->selection->map);
-
+		nr_options += add_socket_opt(browser, &actions[nr_options],
+					     &options[nr_options],
+					     socket);
 		/* perf script support */
 		if (browser->he_selection) {
 			nr_options += add_script_opt(browser,
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index d7e53c2..bb633cd 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1308,6 +1308,25 @@ static bool hists__filter_entry_by_socket(struct hists *hists,
 	return false;
 }
 
+void hists__filter_by_socket(struct hists *hists)
+{
+	struct rb_node *nd;
+
+	hists->stats.nr_non_filtered_samples = 0;
+
+	hists__reset_filter_stats(hists);
+	hists__reset_col_len(hists);
+
+	for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) {
+		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
+
+		if (hists__filter_entry_by_socket(hists, h))
+			continue;
+
+		hists__remove_entry_filter(hists, h, HIST_FILTER__SOCKET);
+	}
+}
+
 void events_stats__inc(struct events_stats *stats, u32 type)
 {
 	++stats->nr_events[0];
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index ef682f2..4d6aa1d 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -147,6 +147,7 @@ size_t perf_evlist__fprintf_nr_events(struct perf_evlist *evlist, FILE *fp);
 void hists__filter_by_dso(struct hists *hists);
 void hists__filter_by_thread(struct hists *hists);
 void hists__filter_by_symbol(struct hists *hists);
+void hists__filter_by_socket(struct hists *hists);
 
 static inline bool hists__has_filter(struct hists *hists)
 {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/5] perf,test: test hists socket filter
  2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
                   ` (2 preceding siblings ...)
  2015-09-04 14:45 ` [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang
@ 2015-09-04 14:45 ` kan.liang
  2015-09-15  7:06   ` [tip:perf/core] perf test: Add entry for " tip-bot for Kan Liang
  2015-09-15  7:05 ` [tip:perf/core] perf tools: Add processor socket info to hist_entry and addr_location tip-bot for Kan Liang
  4 siblings, 1 reply; 17+ messages in thread
From: kan.liang @ 2015-09-04 14:45 UTC (permalink / raw)
  To: acme; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel, Kan Liang

From: Kan Liang <kan.liang@intel.com>

Add test case for hists socket filter.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 tools/perf/tests/hists_filter.c | 55 +++++++++++++++++++++++++++++++++--------
 1 file changed, 45 insertions(+), 10 deletions(-)

diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c
index ce48775..818acf8 100644
--- a/tools/perf/tests/hists_filter.c
+++ b/tools/perf/tests/hists_filter.c
@@ -16,30 +16,31 @@ struct sample {
 	struct thread *thread;
 	struct map *map;
 	struct symbol *sym;
+	int socket;
 };
 
 /* For the numbers, see hists_common.c */
 static struct sample fake_samples[] = {
 	/* perf [kernel] schedule() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, .socket = 0 },
 	/* perf [perf]   main() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_MAIN, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_MAIN, .socket = 0 },
 	/* perf [libc]   malloc() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, .socket = 0 },
 	/* perf [perf]   main() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, }, /* will be merged */
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, .socket = 0 }, /* will be merged */
 	/* perf [perf]   cmd_record() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, },
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, .socket = 1 },
 	/* perf [kernel] page_fault() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_PAGE_FAULT, },
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 1 },
 	/* bash [bash]   main() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_MAIN, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_MAIN, .socket = 2 },
 	/* bash [bash]   xmalloc() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_XMALLOC, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_XMALLOC, .socket = 2 },
 	/* bash [libc]   malloc() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_LIBC_MALLOC, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_LIBC_MALLOC, .socket = 3 },
 	/* bash [kernel] page_fault() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 3 },
 };
 
 static int add_hist_entries(struct perf_evlist *evlist,
@@ -83,6 +84,7 @@ static int add_hist_entries(struct perf_evlist *evlist,
 							  &sample) < 0)
 				goto out;
 
+			al.socket = fake_samples[i].socket;
 			if (hist_entry_iter__add(&iter, &al,
 						 PERF_MAX_STACK_DEPTH, NULL) < 0) {
 				addr_location__put(&al);
@@ -253,6 +255,39 @@ int test__hists_filter(void)
 		TEST_ASSERT_VAL("Unmatched total period for symbol filter",
 				hists->stats.total_non_filtered_period == 300);
 
+		/* remove symbol filter first */
+		hists->symbol_filter_str = NULL;
+		hists__filter_by_symbol(hists);
+
+		/* now applying socket filters */
+		hists->socket_filter = 2;
+		hists__filter_by_socket(hists);
+
+		if (verbose > 2) {
+			pr_info("Histogram for socket filters\n");
+			print_hists_out(hists);
+		}
+
+		/* normal stats should be invariant */
+		TEST_ASSERT_VAL("Invalid nr samples",
+				hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10);
+		TEST_ASSERT_VAL("Invalid nr hist entries",
+				hists->nr_entries == 9);
+		TEST_ASSERT_VAL("Invalid total period",
+				hists->stats.total_period == 1000);
+
+		/* but filter stats are changed */
+		TEST_ASSERT_VAL("Unmatched nr samples for socket filter",
+				hists->stats.nr_non_filtered_samples == 2);
+		TEST_ASSERT_VAL("Unmatched nr hist entries for socket filter",
+				hists->nr_non_filtered_entries == 2);
+		TEST_ASSERT_VAL("Unmatched total period for socket filter",
+				hists->stats.total_non_filtered_period == 200);
+
+		/* remove socket filter first */
+		hists->socket_filter = -1;
+		hists__filter_by_socket(hists);
+
 		/* now applying all filters at once. */
 		hists->thread_filter = fake_samples[1].thread;
 		hists->dso_filter = fake_samples[1].map->dso;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] perf,tools: zoom in/out for processor socket
  2015-09-04 14:45 ` [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang
@ 2015-09-04 22:09   ` Andi Kleen
  2015-09-15  7:06   ` [tip:perf/core] perf hists browser: Zoom in/ out " tip-bot for Kan Liang
  1 sibling, 0 replies; 17+ messages in thread
From: Andi Kleen @ 2015-09-04 22:09 UTC (permalink / raw)
  To: kan.liang; +Cc: acme, jolsa, namhyung, adrian.hunter, eranian, linux-kernel

On Fri, Sep 04, 2015 at 10:45:45AM -0400, kan.liang@intel.com wrote:
> From: Kan Liang <kan.liang@intel.com>
> 
> Currently, users can zoom in/out for threads and dso in perf top and
> report. This patch extends it for socket.
> 'S' is the short key to zoom into current Processor Socket.

Nice feature.

Would be nice to also able to zoom into the current logical CPU.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
@ 2015-09-04 22:41   ` Arnaldo Carvalho de Melo
  2015-09-04 22:52     ` Arnaldo Carvalho de Melo
  2015-09-15  7:05   ` [tip:perf/core] perf tools: Introduce new sort type "socket" for the processor socket tip-bot for Kan Liang
  1 sibling, 1 reply; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 22:41 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 10:45:43AM -0400, kan.liang@intel.com escreveu:
> From: Kan Liang <kan.liang@intel.com>
> 
> This patch enable perf report to sort by processor socket
> 
> $ perf report --stdio --sort socket,comm,dso,symbol
>  # To display the perf.data header info, please use
>  --header/--header-only options.
>  #
>  #
>  # Total Lost Samples: 0
>  #
>  # Samples: 686  of event 'cycles'
>  # Event count (approx.): 349215462
>  #
>  # Overhead  SOCKET  Command    Shared Object     Symbol
>  # ........  ......  .........  ................
>  .................................

So this works in 'perf top' only for the first screen rendering, when it
refreshes we lose the "SOCKET" header (why all caps?) and the colum
stops being %03d and instead becomes %d, I am checking now.

- Arnaldo

>  #
>     97.05%     000  test       test              [.] plusB_c
>      0.98%     000  test       test              [.] plusA_c
>      0.93%     001  perf       [kernel.vmlinux]  [k]
> smp_call_function_single
>      0.19%     001  perf       [kernel.vmlinux]  [k] page_fault
>      0.19%     001  swapper    [kernel.vmlinux]  [k] pm_qos_request
>      0.16%     000  test       [kernel.vmlinux]  [k] add_mm_counter_fast
> 
> Signed-off-by: Kan Liang <kan.liang@intel.com>
> ---
>  tools/perf/Documentation/perf-report.txt |  3 ++-
>  tools/perf/util/hist.h                   |  1 +
>  tools/perf/util/sort.c                   | 22 ++++++++++++++++++++++
>  tools/perf/util/sort.h                   |  1 +
>  4 files changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
> index 9c7981b..92361a7 100644
> --- a/tools/perf/Documentation/perf-report.txt
> +++ b/tools/perf/Documentation/perf-report.txt
> @@ -68,7 +68,7 @@ OPTIONS
>  --sort=::
>  	Sort histogram entries by given key(s) - multiple keys can be specified
>  	in CSV format.  Following sort keys are available:
> -	pid, comm, dso, symbol, parent, cpu, srcline, weight, local_weight.
> +	pid, comm, dso, symbol, parent, cpu, socket, srcline, weight, local_weight.
>  
>  	Each key has following meaning:
>  
> @@ -79,6 +79,7 @@ OPTIONS
>  	- parent: name of function matched to the parent regex filter. Unmatched
>  	entries are displayed as "[other]".
>  	- cpu: cpu number the task ran at the time of sample
> +	- socket: processor socket number the task ran at the time of sample
>  	- srcline: filename and line number executed at the time of sample.  The
>  	DWARF debugging info must be provided.
>  	- srcfile: file name of the source file of the same. Requires dwarf
> diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
> index de6d58e..5d04d28 100644
> --- a/tools/perf/util/hist.h
> +++ b/tools/perf/util/hist.h
> @@ -29,6 +29,7 @@ enum hist_column {
>  	HISTC_COMM,
>  	HISTC_PARENT,
>  	HISTC_CPU,
> +	HISTC_SOCKET,
>  	HISTC_SRCLINE,
>  	HISTC_SRCFILE,
>  	HISTC_MISPREDICT,
> diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> index a97bcee..c4a32b9 100644
> --- a/tools/perf/util/sort.c
> +++ b/tools/perf/util/sort.c
> @@ -421,6 +421,27 @@ struct sort_entry sort_cpu = {
>  	.se_width_idx	= HISTC_CPU,
>  };
>  
> +/* --sort socket */
> +
> +static int64_t
> +sort__socket_cmp(struct hist_entry *left, struct hist_entry *right)
> +{
> +	return right->socket - left->socket;
> +}
> +
> +static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf,
> +				    size_t size, unsigned int width)
> +{
> +	return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket);
> +}
> +
> +struct sort_entry sort_socket = {
> +	.se_header      = "SOCKET",
> +	.se_cmp	        = sort__socket_cmp,
> +	.se_snprintf    = hist_entry__socket_snprintf,
> +	.se_width_idx	= HISTC_SOCKET,
> +};
> +
>  /* sort keys for branch stacks */
>  
>  static int64_t
> @@ -1248,6 +1269,7 @@ static struct sort_dimension common_sort_dimensions[] = {
>  	DIM(SORT_SYM, "symbol", sort_sym),
>  	DIM(SORT_PARENT, "parent", sort_parent),
>  	DIM(SORT_CPU, "cpu", sort_cpu),
> +	DIM(SORT_SOCKET, "socket", sort_socket),
>  	DIM(SORT_SRCLINE, "srcline", sort_srcline),
>  	DIM(SORT_SRCFILE, "srcfile", sort_srcfile),
>  	DIM(SORT_LOCAL_WEIGHT, "local_weight", sort_local_weight),
> diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
> index 7cf1cf7..654ac8a 100644
> --- a/tools/perf/util/sort.h
> +++ b/tools/perf/util/sort.h
> @@ -173,6 +173,7 @@ enum sort_type {
>  	SORT_SYM,
>  	SORT_PARENT,
>  	SORT_CPU,
> +	SORT_SOCKET,
>  	SORT_SRCLINE,
>  	SORT_SRCFILE,
>  	SORT_LOCAL_WEIGHT,
> -- 
> 1.8.3.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 22:41   ` Arnaldo Carvalho de Melo
@ 2015-09-04 22:52     ` Arnaldo Carvalho de Melo
  2015-09-04 23:06       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 22:52 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 07:41:39PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Sep 04, 2015 at 10:45:43AM -0400, kan.liang@intel.com escreveu:
> > From: Kan Liang <kan.liang@intel.com>
> > 
> > This patch enable perf report to sort by processor socket
> > 
> > $ perf report --stdio --sort socket,comm,dso,symbol
> >  # To display the perf.data header info, please use
> >  --header/--header-only options.
> >  #
> >  #
> >  # Total Lost Samples: 0
> >  #
> >  # Samples: 686  of event 'cycles'
> >  # Event count (approx.): 349215462
> >  #
> >  # Overhead  SOCKET  Command    Shared Object     Symbol
> >  # ........  ......  .........  ................
> >  .................................
> 
> So this works in 'perf top' only for the first screen rendering, when it
> refreshes we lose the "SOCKET" header (why all caps?) and the colum
> stops being %03d and instead becomes %d, I am checking now.

Patch below fix this, but we stumble in another problem, when zooming it
is not eliding the SOCKET column, i.e. if we're zooming into a column,
it will have the same value for all entries, no use in showing it, save
some columns, will check that as well.

Will fold the fixes to the patches where the problems were introduced,
the feature is cool, one more zoom! :-)

Thanks,

- Arnaldo

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index bb633cd4730a..67b48616ab31 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -146,6 +146,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
 		hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO);
 	}
 
+	hists__new_col_len(hists, HISTC_SOCKET, 6);
 	hists__new_col_len(hists, HISTC_MEM_LOCKED, 6);
 	hists__new_col_len(hists, HISTC_MEM_TLB, 22);
 	hists__new_col_len(hists, HISTC_MEM_SNOOP, 12);

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 22:52     ` Arnaldo Carvalho de Melo
@ 2015-09-04 23:06       ` Arnaldo Carvalho de Melo
  2015-09-04 23:25         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 23:06 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 07:52:55PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Sep 04, 2015 at 07:41:39PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Sep 04, 2015 at 10:45:43AM -0400, kan.liang@intel.com escreveu:
> > > From: Kan Liang <kan.liang@intel.com>
> > > 
> > > This patch enable perf report to sort by processor socket
> > > 
> > > $ perf report --stdio --sort socket,comm,dso,symbol
> > >  # To display the perf.data header info, please use
> > >  --header/--header-only options.
> > >  #
> > >  #
> > >  # Total Lost Samples: 0
> > >  #
> > >  # Samples: 686  of event 'cycles'
> > >  # Event count (approx.): 349215462
> > >  #
> > >  # Overhead  SOCKET  Command    Shared Object     Symbol
> > >  # ........  ......  .........  ................
> > >  .................................
> > 
> > So this works in 'perf top' only for the first screen rendering, when it
> > refreshes we lose the "SOCKET" header (why all caps?) and the colum
> > stops being %03d and instead becomes %d, I am checking now.
> 
> Patch below fix this, but we stumble in another problem, when zooming it
> is not eliding the SOCKET column, i.e. if we're zooming into a column,
> it will have the same value for all entries, no use in showing it, save
> some columns, will check that as well.
> 
> Will fold the fixes to the patches where the problems were introduced,
> the feature is cool, one more zoom! :-)

One more fixed, see below, now we have another, using ESC should remove
the last applied Zoom operation, just like for the other Zoom operations
(DSO, thread, etc), looking at that now.

- Arnaldo

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index d695fd2b6228..67d40feb1880 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1680,12 +1680,14 @@ add_exit_opt(struct hist_browser *browser __maybe_unused,
 static int
 do_zoom_socket(struct hist_browser *browser, struct popup_action *act)
 {
-	if (browser->hists->socket_filter > -1)
+	if (browser->hists->socket_filter > -1) {
 		browser->hists->socket_filter = -1;
-	else
+		perf_hpp__set_elide(HISTC_SOCKET, false);
+	} else {
 		browser->hists->socket_filter = act->socket;
+		perf_hpp__set_elide(HISTC_SOCKET, true);
+	}
 
-	perf_hpp__set_elide(HISTC_SOCKET, false);
 	hists__filter_by_socket(browser->hists);
 	hist_browser__reset(browser);
 	return 0;

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 23:06       ` Arnaldo Carvalho de Melo
@ 2015-09-04 23:25         ` Arnaldo Carvalho de Melo
  2015-09-04 23:26           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 23:25 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 08:06:21PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Sep 04, 2015 at 07:52:55PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Sep 04, 2015 at 07:41:39PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Sep 04, 2015 at 10:45:43AM -0400, kan.liang@intel.com escreveu:
> > > > From: Kan Liang <kan.liang@intel.com>
> > > > 
> > > > This patch enable perf report to sort by processor socket
> > > > 
> > > > $ perf report --stdio --sort socket,comm,dso,symbol
> > > >  # To display the perf.data header info, please use
> > > >  --header/--header-only options.
> > > >  #
> > > >  #
> > > >  # Total Lost Samples: 0
> > > >  #
> > > >  # Samples: 686  of event 'cycles'
> > > >  # Event count (approx.): 349215462
> > > >  #
> > > >  # Overhead  SOCKET  Command    Shared Object     Symbol
> > > >  # ........  ......  .........  ................
> > > >  .................................
> > > 
> > > So this works in 'perf top' only for the first screen rendering, when it
> > > refreshes we lose the "SOCKET" header (why all caps?) and the colum
> > > stops being %03d and instead becomes %d, I am checking now.
> > 
> > Patch below fix this, but we stumble in another problem, when zooming it
> > is not eliding the SOCKET column, i.e. if we're zooming into a column,
> > it will have the same value for all entries, no use in showing it, save
> > some columns, will check that as well.
> > 
> > Will fold the fixes to the patches where the problems were introduced,
> > the feature is cool, one more zoom! :-)
> 
> One more fixed, see below, now we have another, using ESC should remove
> the last applied Zoom operation, just like for the other Zoom operations
> (DSO, thread, etc), looking at that now.

Fixed, see below, to test, press S, then d to zoom into Socket then DSO
and then press ESC to unzoom one level (the DSO in this case) then ESC
again, to unzoom the Socket one.

If you use the left arrow key it will be equivalent to ESC, but we'll
repurpose the left/right arrows for horizontal scrolling soon.

- Arnaldo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 23:25         ` Arnaldo Carvalho de Melo
@ 2015-09-04 23:26           ` Arnaldo Carvalho de Melo
  2015-09-04 23:30             ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 23:26 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 08:25:47PM -0300, Arnaldo Carvalho de Melo escreveu:
> > One more fixed, see below, now we have another, using ESC should remove
> > the last applied Zoom operation, just like for the other Zoom operations
> > (DSO, thread, etc), looking at that now.
> 
> Fixed, see below, to test, press S, then d to zoom into Socket then DSO
> and then press ESC to unzoom one level (the DSO in this case) then ESC
> again, to unzoom the Socket one.
> 
> If you use the left arrow key it will be equivalent to ESC, but we'll
> repurpose the left/right arrows for horizontal scrolling soon.
> 
Ooops, here it is:


diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 67d40feb1880..e4fd40f72b4a 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1681,11 +1681,13 @@ static int
 do_zoom_socket(struct hist_browser *browser, struct popup_action *act)
 {
 	if (browser->hists->socket_filter > -1) {
+		pstack__remove(browser->pstack, &browser->hists->socket_filter);
 		browser->hists->socket_filter = -1;
 		perf_hpp__set_elide(HISTC_SOCKET, false);
 	} else {
 		browser->hists->socket_filter = act->socket;
 		perf_hpp__set_elide(HISTC_SOCKET, true);
+		pstack__push(browser->pstack, &browser->hists->socket_filter);
 	}
 
 	hists__filter_by_socket(browser->hists);
@@ -1794,7 +1796,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		hist_browser__update_nr_entries(browser);
 	}
 
-	browser->pstack = pstack__new(2);
+	browser->pstack = pstack__new(3);
 	if (browser->pstack == NULL)
 		goto out;
 
@@ -1944,9 +1946,11 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 				 * Ditto for thread below.
 				 */
 				do_zoom_dso(browser, actions);
-			}
-			if (top == &browser->hists->thread_filter)
+			} else if (top == &browser->hists->thread_filter) {
 				do_zoom_thread(browser, actions);
+			} else if (top == &browser->hists->socket_filter) {
+				do_zoom_socket(browser, actions);
+			}
 			continue;
 		}
 		case 'q':

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] perf,tools: Support new sort type --socket
  2015-09-04 23:26           ` Arnaldo Carvalho de Melo
@ 2015-09-04 23:30             ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 17+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-09-04 23:30 UTC (permalink / raw)
  To: kan.liang; +Cc: jolsa, namhyung, adrian.hunter, eranian, ak, linux-kernel

Em Fri, Sep 04, 2015 at 08:26:18PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Sep 04, 2015 at 08:25:47PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > One more fixed, see below, now we have another, using ESC should remove
> > > the last applied Zoom operation, just like for the other Zoom operations
> > > (DSO, thread, etc), looking at that now.
> > 
> > Fixed, see below, to test, press S, then d to zoom into Socket then DSO
> > and then press ESC to unzoom one level (the DSO in this case) then ESC
> > again, to unzoom the Socket one.
> > 
> > If you use the left arrow key it will be equivalent to ESC, but we'll
> > repurpose the left/right arrows for horizontal scrolling soon.
> > 
> Ooops, here it is:

Ok, I have all updated and pushed to my perf/core branch, please take a
look/test.

- Arnaldo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [tip:perf/core] perf tools: Add processor socket info to hist_entry and addr_location
  2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
                   ` (3 preceding siblings ...)
  2015-09-04 14:45 ` [PATCH 5/5] perf,test: test hists socket filter kan.liang
@ 2015-09-15  7:05 ` tip-bot for Kan Liang
  4 siblings, 0 replies; 17+ messages in thread
From: tip-bot for Kan Liang @ 2015-09-15  7:05 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: ak, mingo, wangnan0, acme, jolsa, eranian, tglx, adrian.hunter,
	kan.liang, namhyung, hpa, linux-kernel

Commit-ID:  0c4c4debb0adda4c18c158d95031dc2b9f637869
Gitweb:     http://git.kernel.org/tip/0c4c4debb0adda4c18c158d95031dc2b9f637869
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 4 Sep 2015 10:45:42 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 12:50:29 -0300

perf tools: Add processor socket info to hist_entry and addr_location

This information will come from perf.data files of from the current
system, cached when needed, such as when the 'socket' sort order gets
introduced.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1441377946-44429-1-git-send-email-kan.liang@intel.com
[ Don't blindly use env->cpu[al.cpu].socket_id & use machine->env, fixes by Jiri & Arnaldo ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/event.c  | 8 ++++++++
 tools/perf/util/hist.c   | 1 +
 tools/perf/util/sort.h   | 1 +
 tools/perf/util/symbol.h | 1 +
 4 files changed, 11 insertions(+)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 7ff6127..497157a 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1021,6 +1021,14 @@ int perf_event__preprocess_sample(const union perf_event *event,
 
 	al->sym = NULL;
 	al->cpu = sample->cpu;
+	al->socket = -1;
+
+	if (al->cpu >= 0) {
+		struct perf_env *env = machine->env;
+
+		if (env && env->cpu)
+			al->socket = env->cpu[al->cpu].socket_id;
+	}
 
 	if (al->map) {
 		struct dso *dso = al->map->dso;
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 48d5906..d2b94c4 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -453,6 +453,7 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
 			.map	= al->map,
 			.sym	= al->sym,
 		},
+		.socket	 = al->socket,
 		.cpu	 = al->cpu,
 		.cpumode = al->cpumode,
 		.ip	 = al->addr,
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 3c2a399..7cf1cf7 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -90,6 +90,7 @@ struct hist_entry {
 	struct comm		*comm;
 	u64			ip;
 	u64			transaction;
+	s32			socket;
 	s32			cpu;
 	u8			cpumode;
 
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 440ba8a..40073c6 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -191,6 +191,7 @@ struct addr_location {
 	u8	      filtered;
 	u8	      cpumode;
 	s32	      cpu;
+	s32	      socket;
 };
 
 struct symsrc {

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [tip:perf/core] perf tools: Introduce new sort type "socket" for the processor socket
  2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
  2015-09-04 22:41   ` Arnaldo Carvalho de Melo
@ 2015-09-15  7:05   ` tip-bot for Kan Liang
  1 sibling, 0 replies; 17+ messages in thread
From: tip-bot for Kan Liang @ 2015-09-15  7:05 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: adrian.hunter, acme, tglx, jolsa, linux-kernel, mingo, ak,
	namhyung, hpa, kan.liang, eranian

Commit-ID:  2e7ea3ab8282f6bb1d211d8af760a734c055f493
Gitweb:     http://git.kernel.org/tip/2e7ea3ab8282f6bb1d211d8af760a734c055f493
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 4 Sep 2015 10:45:43 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 12:50:30 -0300

perf tools: Introduce new sort type "socket" for the processor socket

This patch enable perf report to sort by processor socket:

  $ perf report --stdio --sort socket,comm,dso,symbol
  # To display the perf.data header info, please use --header/--header-only options.
  #
  # Total Lost Samples: 0
  #
  # Samples: 686  of event 'cycles'
  # Event count (approx.): 349215462
  #
  # Overhead SOCKET Command Shared Object    Symbol
  # ........ ...... ....... ................ ............................
  #
    97.05%    000   test    test             [.] plusB_c
     0.98%    000   test    test             [.] plusA_c
     0.93%    001   perf    [kernel.vmlinux] [k] smp_call_function_single
     0.19%    001   perf    [kernel.vmlinux] [k] page_fault
     0.19%    001   swapper [kernel.vmlinux] [k] pm_qos_request
     0.16%    000   test    [kernel.vmlinux] [k] add_mm_counter_fast

Signed-off-by: Kan Liang <kan.liang@intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1441377946-44429-2-git-send-email-kan.liang@intel.com
[ Fix col calc, un-allcapsify col header & read the topology when not using perf.data ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-report.txt |  3 ++-
 tools/perf/builtin-top.c                 | 15 +++++++++++++++
 tools/perf/util/hist.c                   |  1 +
 tools/perf/util/hist.h                   |  1 +
 tools/perf/util/sort.c                   | 25 +++++++++++++++++++++++++
 tools/perf/util/sort.h                   |  2 ++
 6 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 9c7981b..92361a7 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -68,7 +68,7 @@ OPTIONS
 --sort=::
 	Sort histogram entries by given key(s) - multiple keys can be specified
 	in CSV format.  Following sort keys are available:
-	pid, comm, dso, symbol, parent, cpu, srcline, weight, local_weight.
+	pid, comm, dso, symbol, parent, cpu, socket, srcline, weight, local_weight.
 
 	Each key has following meaning:
 
@@ -79,6 +79,7 @@ OPTIONS
 	- parent: name of function matched to the parent regex filter. Unmatched
 	entries are displayed as "[other]".
 	- cpu: cpu number the task ran at the time of sample
+	- socket: processor socket number the task ran at the time of sample
 	- srcline: filename and line number executed at the time of sample.  The
 	DWARF debugging info must be provided.
 	- srcfile: file name of the source file of the same. Requires dwarf
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index e5ca684..bdaf44f 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -963,6 +963,13 @@ static int __cmd_top(struct perf_top *top)
 
 	machine__synthesize_threads(&top->session->machines.host, &opts->target,
 				    top->evlist->threads, false, opts->proc_map_timeout);
+
+	if (sort__has_socket) {
+		ret = perf_env__read_cpu_topology_map(&perf_env);
+		if (ret < 0)
+			goto out_err_cpu_topo;
+	}
+
 	ret = perf_top__start_counters(top);
 	if (ret)
 		goto out_delete;
@@ -1020,6 +1027,14 @@ out_delete:
 	top->session = NULL;
 
 	return ret;
+
+out_err_cpu_topo: {
+	char errbuf[BUFSIZ];
+	const char *err = strerror_r(-ret, errbuf, sizeof(errbuf));
+
+	ui__error("Could not read the CPU topology map: %s\n", err);
+	goto out_delete;
+}
 }
 
 static int
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index d2b94c4..ba72a29 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -145,6 +145,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
 	}
 
 	hists__new_col_len(hists, HISTC_CPU, 3);
+	hists__new_col_len(hists, HISTC_SOCKET, 6);
 	hists__new_col_len(hists, HISTC_MEM_LOCKED, 6);
 	hists__new_col_len(hists, HISTC_MEM_TLB, 22);
 	hists__new_col_len(hists, HISTC_MEM_SNOOP, 12);
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index de6d58e..5d04d28 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -29,6 +29,7 @@ enum hist_column {
 	HISTC_COMM,
 	HISTC_PARENT,
 	HISTC_CPU,
+	HISTC_SOCKET,
 	HISTC_SRCLINE,
 	HISTC_SRCFILE,
 	HISTC_MISPREDICT,
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index a97bcee..6b9556d 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -21,6 +21,7 @@ int		sort__need_collapse = 0;
 int		sort__has_parent = 0;
 int		sort__has_sym = 0;
 int		sort__has_dso = 0;
+int		sort__has_socket = 0;
 enum sort_mode	sort__mode = SORT_MODE__NORMAL;
 
 
@@ -421,6 +422,27 @@ struct sort_entry sort_cpu = {
 	.se_width_idx	= HISTC_CPU,
 };
 
+/* --sort socket */
+
+static int64_t
+sort__socket_cmp(struct hist_entry *left, struct hist_entry *right)
+{
+	return right->socket - left->socket;
+}
+
+static int hist_entry__socket_snprintf(struct hist_entry *he, char *bf,
+				    size_t size, unsigned int width)
+{
+	return repsep_snprintf(bf, size, "%*.*d", width, width-3, he->socket);
+}
+
+struct sort_entry sort_socket = {
+	.se_header      = "Socket",
+	.se_cmp	        = sort__socket_cmp,
+	.se_snprintf    = hist_entry__socket_snprintf,
+	.se_width_idx	= HISTC_SOCKET,
+};
+
 /* sort keys for branch stacks */
 
 static int64_t
@@ -1248,6 +1270,7 @@ static struct sort_dimension common_sort_dimensions[] = {
 	DIM(SORT_SYM, "symbol", sort_sym),
 	DIM(SORT_PARENT, "parent", sort_parent),
 	DIM(SORT_CPU, "cpu", sort_cpu),
+	DIM(SORT_SOCKET, "socket", sort_socket),
 	DIM(SORT_SRCLINE, "srcline", sort_srcline),
 	DIM(SORT_SRCFILE, "srcfile", sort_srcfile),
 	DIM(SORT_LOCAL_WEIGHT, "local_weight", sort_local_weight),
@@ -1550,6 +1573,8 @@ int sort_dimension__add(const char *tok)
 
 		} else if (sd->entry == &sort_dso) {
 			sort__has_dso = 1;
+		} else if (sd->entry == &sort_socket) {
+			sort__has_socket = 1;
 		}
 
 		return __sort_dimension__add(sd);
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 7cf1cf7..c06b757 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -34,6 +34,7 @@ extern int have_ignore_callees;
 extern int sort__need_collapse;
 extern int sort__has_parent;
 extern int sort__has_sym;
+extern int sort__has_socket;
 extern enum sort_mode sort__mode;
 extern struct sort_entry sort_comm;
 extern struct sort_entry sort_dso;
@@ -173,6 +174,7 @@ enum sort_type {
 	SORT_SYM,
 	SORT_PARENT,
 	SORT_CPU,
+	SORT_SOCKET,
 	SORT_SRCLINE,
 	SORT_SRCFILE,
 	SORT_LOCAL_WEIGHT,

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [tip:perf/core] perf report: Introduce --socket-filter option
  2015-09-04 14:45 ` [PATCH 3/5] perf,report: introduce socket-filter option kan.liang
@ 2015-09-15  7:05   ` tip-bot for Kan Liang
  0 siblings, 0 replies; 17+ messages in thread
From: tip-bot for Kan Liang @ 2015-09-15  7:05 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, jolsa, eranian, namhyung, kan.liang, ak, tglx,
	adrian.hunter, mingo, linux-kernel, hpa

Commit-ID:  21394d948a0c7c451d4a4d68afed9a06c4969636
Gitweb:     http://git.kernel.org/tip/21394d948a0c7c451d4a4d68afed9a06c4969636
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 4 Sep 2015 10:45:44 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 12:50:31 -0300

perf report: Introduce --socket-filter option

Introduce --socket-filter option for 'perf report' to only show entries
for a processor socket that match this filter.

  $ perf report --socket-filter 1 --stdio
  # To display the perf.data header info, please use --header/--header-only options.
  #
  # Total Lost Samples: 0
  #
  # Samples: 752  of event 'cycles'
  # Event count (approx.): 350995599
  # Processor Socket: 1
  #
  # Overhead  Command    Shared Object     Symbol
  # ........  .........  ................  .................................
  #
      97.02%  test       test              [.] plusB_c
       0.97%  test       test              [.] plusA_c
       0.23%  swapper    [kernel.vmlinux]  [k] acpi_idle_do_entry
       0.09%  rcu_sched  [kernel.vmlinux]  [k] dyntick_save_progress_counter
       0.01%  swapper    [kernel.vmlinux]  [k] task_waking_fair
       0.00%  swapper    [kernel.vmlinux]  [k] run_timer_softirq

Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1441377946-44429-3-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-report.txt |  3 +++
 tools/perf/builtin-report.c              | 11 +++++++++++
 tools/perf/ui/browsers/hists.c           |  4 ++++
 tools/perf/util/hist.c                   | 16 ++++++++++++++++
 tools/perf/util/hist.h                   |  4 +++-
 5 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 92361a7..b941d5e 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -350,6 +350,9 @@ include::itrace.txt[]
 	This option extends the perf report to show reference callgraphs,
 	which collected by reference event, in no callgraph event.
 
+--socket-filter::
+	Only report the samples on the processor socket that match with this filter
+
 include::callchain-overhead-calculation.txt[]
 
 SEE ALSO
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 62b285e..9b50836 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -62,6 +62,7 @@ struct report {
 	float			min_percent;
 	u64			nr_entries;
 	u64			queue_size;
+	int			socket_filter;
 	DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS);
 };
 
@@ -286,6 +287,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	struct perf_evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
+	int socket = hists->socket_filter;
 
 	if (symbol_conf.filter_relative) {
 		nr_samples = hists->stats.nr_non_filtered_samples;
@@ -326,6 +328,10 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 		ret += fprintf(fp, "\n# Sort order   : %s", sort_order ? : default_mem_sort_order);
 	} else
 		ret += fprintf(fp, "\n# Event count (approx.): %" PRIu64, nr_events);
+
+	if (socket > -1)
+		ret += fprintf(fp, "\n# Processor Socket: %d", socket);
+
 	return ret + fprintf(fp, "\n#\n");
 }
 
@@ -450,6 +456,8 @@ static void report__collapse_hists(struct report *rep)
 		if (pos->idx == 0)
 			hists->symbol_filter_str = rep->symbol_filter_str;
 
+		hists->socket_filter = rep->socket_filter;
+
 		hists__collapse_resort(hists, &prog);
 
 		/* Non-group events are considered as leader */
@@ -635,6 +643,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 		.max_stack		 = PERF_MAX_STACK_DEPTH,
 		.pretty_printing_style	 = "normal",
+		.socket_filter		 = -1,
 	};
 	const struct option options[] = {
 	OPT_STRING('i', "input", &input_name, "file",
@@ -747,6 +756,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
 			"Show full source file name path for source lines"),
 	OPT_BOOLEAN(0, "show-ref-call-graph", &symbol_conf.show_ref_callgraph,
 		    "Show callgraph from reference event"),
+	OPT_INTEGER(0, "socket-filter", &report.socket_filter,
+		    "only show processor socket that match with this filter"),
 	OPT_END()
 	};
 	struct perf_data_file file = {
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 17d6c6d..792dcf5 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1261,6 +1261,7 @@ static int hists__browser_title(struct hists *hists,
 	int printed;
 	const struct dso *dso = hists->dso_filter;
 	const struct thread *thread = hists->thread_filter;
+	int socket = hists->socket_filter;
 	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
 	u64 nr_events = hists->stats.total_period;
 	struct perf_evsel *evsel = hists_to_evsel(hists);
@@ -1314,6 +1315,9 @@ static int hists__browser_title(struct hists *hists,
 	if (dso)
 		printed += scnprintf(bf + printed, size - printed,
 				    ", DSO: %s", dso->short_name);
+	if (socket > -1)
+		printed += scnprintf(bf + printed, size - printed,
+				    ", Processor Socket: %d", socket);
 	if (!is_report_browser(hbt)) {
 		struct perf_top *top = hbt->arg;
 
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index ba72a29..5d78ae8 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -15,6 +15,8 @@ static bool hists__filter_entry_by_thread(struct hists *hists,
 					  struct hist_entry *he);
 static bool hists__filter_entry_by_symbol(struct hists *hists,
 					  struct hist_entry *he);
+static bool hists__filter_entry_by_socket(struct hists *hists,
+					  struct hist_entry *he);
 
 u16 hists__col_len(struct hists *hists, enum hist_column col)
 {
@@ -1027,6 +1029,7 @@ static void hists__apply_filters(struct hists *hists, struct hist_entry *he)
 	hists__filter_entry_by_dso(hists, he);
 	hists__filter_entry_by_thread(hists, he);
 	hists__filter_entry_by_symbol(hists, he);
+	hists__filter_entry_by_socket(hists, he);
 }
 
 void hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
@@ -1295,6 +1298,18 @@ void hists__filter_by_symbol(struct hists *hists)
 	}
 }
 
+static bool hists__filter_entry_by_socket(struct hists *hists,
+					  struct hist_entry *he)
+{
+	if ((hists->socket_filter > -1) &&
+	    (he->socket != hists->socket_filter)) {
+		he->filtered |= (1 << HIST_FILTER__SOCKET);
+		return true;
+	}
+
+	return false;
+}
+
 void events_stats__inc(struct events_stats *stats, u32 type)
 {
 	++stats->nr_events[0];
@@ -1520,6 +1535,7 @@ static int hists_evsel__init(struct perf_evsel *evsel)
 	hists->entries_collapsed = RB_ROOT;
 	hists->entries = RB_ROOT;
 	pthread_mutex_init(&hists->lock, NULL);
+	hists->socket_filter = -1;
 	return 0;
 }
 
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 5d04d28..ef682f2 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -20,6 +20,7 @@ enum hist_filter {
 	HIST_FILTER__SYMBOL,
 	HIST_FILTER__GUEST,
 	HIST_FILTER__HOST,
+	HIST_FILTER__SOCKET,
 };
 
 enum hist_column {
@@ -71,6 +72,7 @@ struct hists {
 	struct events_stats	stats;
 	u64			event_stream;
 	u16			col_len[HISTC_NR_COLS];
+	int			socket_filter;
 };
 
 struct hist_entry_iter;
@@ -149,7 +151,7 @@ void hists__filter_by_symbol(struct hists *hists);
 static inline bool hists__has_filter(struct hists *hists)
 {
 	return hists->thread_filter || hists->dso_filter ||
-		hists->symbol_filter_str;
+		hists->symbol_filter_str || (hists->socket_filter > -1);
 }
 
 u16 hists__col_len(struct hists *hists, enum hist_column col);

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [tip:perf/core] perf hists browser: Zoom in/ out for processor socket
  2015-09-04 14:45 ` [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang
  2015-09-04 22:09   ` Andi Kleen
@ 2015-09-15  7:06   ` tip-bot for Kan Liang
  1 sibling, 0 replies; 17+ messages in thread
From: tip-bot for Kan Liang @ 2015-09-15  7:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, adrian.hunter, jolsa, tglx, kan.liang, mingo, ak,
	eranian, hpa, acme, namhyung

Commit-ID:  84734b06b63093cd44533f4caa43d4452fb11ec3
Gitweb:     http://git.kernel.org/tip/84734b06b63093cd44533f4caa43d4452fb11ec3
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 4 Sep 2015 10:45:45 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 13:02:08 -0300

perf hists browser: Zoom in/out for processor socket

Currently, users can zoom in/out for threads and dso in 'perf top' and
'perf report'.

This patch extends it for the processor sockets.

'S' is the short key to zoom into current Processor Socket.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1441377946-44429-4-git-send-email-kan.liang@intel.com
[ - Made it elide the Socket column when zooming into it,
    just like with the other zoom ops;
  - Make it use browser->pstack, to unzoom level by level;
  - Rename 'socket' variables to 'socket_id' to make it build on
    older systems where it shadows a global glibc declaration ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c    |  6 ++---
 tools/perf/ui/browsers/hists.c | 61 +++++++++++++++++++++++++++++++++++++-----
 tools/perf/util/hist.c         | 19 +++++++++++++
 tools/perf/util/hist.h         |  1 +
 4 files changed, 77 insertions(+), 10 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 9b50836..e4e3f14 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -287,7 +287,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	struct perf_evsel *evsel = hists_to_evsel(hists);
 	char buf[512];
 	size_t size = sizeof(buf);
-	int socket = hists->socket_filter;
+	int socked_id = hists->socket_filter;
 
 	if (symbol_conf.filter_relative) {
 		nr_samples = hists->stats.nr_non_filtered_samples;
@@ -329,8 +329,8 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
 	} else
 		ret += fprintf(fp, "\n# Event count (approx.): %" PRIu64, nr_events);
 
-	if (socket > -1)
-		ret += fprintf(fp, "\n# Processor Socket: %d", socket);
+	if (socked_id > -1)
+		ret += fprintf(fp, "\n# Processor Socket: %d", socked_id);
 
 	return ret + fprintf(fp, "\n#\n");
 }
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 792dcf5..380e908 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1261,7 +1261,7 @@ static int hists__browser_title(struct hists *hists,
 	int printed;
 	const struct dso *dso = hists->dso_filter;
 	const struct thread *thread = hists->thread_filter;
-	int socket = hists->socket_filter;
+	int socket_id = hists->socket_filter;
 	unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE];
 	u64 nr_events = hists->stats.total_period;
 	struct perf_evsel *evsel = hists_to_evsel(hists);
@@ -1315,9 +1315,9 @@ static int hists__browser_title(struct hists *hists,
 	if (dso)
 		printed += scnprintf(bf + printed, size - printed,
 				    ", DSO: %s", dso->short_name);
-	if (socket > -1)
+	if (socket_id > -1)
 		printed += scnprintf(bf + printed, size - printed,
-				    ", Processor Socket: %d", socket);
+				    ", Processor Socket: %d", socket_id);
 	if (!is_report_browser(hbt)) {
 		struct perf_top *top = hbt->arg;
 
@@ -1429,6 +1429,7 @@ struct popup_action {
 	struct thread 		*thread;
 	struct dso		*dso;
 	struct map_symbol 	ms;
+	int			socket;
 
 	int (*fn)(struct hist_browser *browser, struct popup_action *act);
 };
@@ -1676,6 +1677,41 @@ add_exit_opt(struct hist_browser *browser __maybe_unused,
 	return 1;
 }
 
+static int
+do_zoom_socket(struct hist_browser *browser, struct popup_action *act)
+{
+	if (browser->hists->socket_filter > -1) {
+		pstack__remove(browser->pstack, &browser->hists->socket_filter);
+		browser->hists->socket_filter = -1;
+		perf_hpp__set_elide(HISTC_SOCKET, false);
+	} else {
+		browser->hists->socket_filter = act->socket;
+		perf_hpp__set_elide(HISTC_SOCKET, true);
+		pstack__push(browser->pstack, &browser->hists->socket_filter);
+	}
+
+	hists__filter_by_socket(browser->hists);
+	hist_browser__reset(browser);
+	return 0;
+}
+
+static int
+add_socket_opt(struct hist_browser *browser, struct popup_action *act,
+	       char **optstr, int socket_id)
+{
+	if (socket_id < 0)
+		return 0;
+
+	if (asprintf(optstr, "Zoom %s Processor Socket %d",
+		     (browser->hists->socket_filter > -1) ? "out of" : "into",
+		     socket_id) < 0)
+		return 0;
+
+	act->socket = socket_id;
+	act->fn = do_zoom_socket;
+	return 1;
+}
+
 static void hist_browser__update_nr_entries(struct hist_browser *hb)
 {
 	u64 nr_entries = 0;
@@ -1729,6 +1765,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	"E             Expand all callchains\n"				\
 	"F             Toggle percentage of filtered entries\n"		\
 	"H             Display column headers\n"			\
+	"S             Zoom into current Processor Socket\n"		\
 
 	/* help messages are sorted by lexical order of the hotkey */
 	const char report_help[] = HIST_BROWSER_HELP_COMMON
@@ -1759,7 +1796,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		hist_browser__update_nr_entries(browser);
 	}
 
-	browser->pstack = pstack__new(2);
+	browser->pstack = pstack__new(3);
 	if (browser->pstack == NULL)
 		goto out;
 
@@ -1778,6 +1815,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		struct thread *thread = NULL;
 		struct dso *dso = NULL;
 		int choice = 0;
+		int socked_id = -1;
 
 		nr_options = 0;
 
@@ -1786,6 +1824,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		if (browser->he_selection != NULL) {
 			thread = hist_browser__selected_thread(browser);
 			dso = browser->selection->map ? browser->selection->map->dso : NULL;
+			socked_id = browser->he_selection->socket;
 		}
 		switch (key) {
 		case K_TAB:
@@ -1828,6 +1867,10 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 			actions->thread = thread;
 			do_zoom_thread(browser, actions);
 			continue;
+		case 'S':
+			actions->socket = socked_id;
+			do_zoom_socket(browser, actions);
+			continue;
 		case '/':
 			if (ui_browser__input_window("Symbol to show",
 					"Please enter the name of symbol you want to see",
@@ -1903,9 +1946,11 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 				 * Ditto for thread below.
 				 */
 				do_zoom_dso(browser, actions);
-			}
-			if (top == &browser->hists->thread_filter)
+			} else if (top == &browser->hists->thread_filter) {
 				do_zoom_thread(browser, actions);
+			} else if (top == &browser->hists->socket_filter) {
+				do_zoom_socket(browser, actions);
+			}
 			continue;
 		}
 		case 'q':
@@ -1973,7 +2018,9 @@ skip_annotation:
 		nr_options += add_map_opt(browser, &actions[nr_options],
 					  &options[nr_options],
 					  browser->selection->map);
-
+		nr_options += add_socket_opt(browser, &actions[nr_options],
+					     &options[nr_options],
+					     socked_id);
 		/* perf script support */
 		if (browser->he_selection) {
 			nr_options += add_script_opt(browser,
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 5d78ae8..b3567a2 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1310,6 +1310,25 @@ static bool hists__filter_entry_by_socket(struct hists *hists,
 	return false;
 }
 
+void hists__filter_by_socket(struct hists *hists)
+{
+	struct rb_node *nd;
+
+	hists->stats.nr_non_filtered_samples = 0;
+
+	hists__reset_filter_stats(hists);
+	hists__reset_col_len(hists);
+
+	for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) {
+		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
+
+		if (hists__filter_entry_by_socket(hists, h))
+			continue;
+
+		hists__remove_entry_filter(hists, h, HIST_FILTER__SOCKET);
+	}
+}
+
 void events_stats__inc(struct events_stats *stats, u32 type)
 {
 	++stats->nr_events[0];
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index ef682f2..4d6aa1d 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -147,6 +147,7 @@ size_t perf_evlist__fprintf_nr_events(struct perf_evlist *evlist, FILE *fp);
 void hists__filter_by_dso(struct hists *hists);
 void hists__filter_by_thread(struct hists *hists);
 void hists__filter_by_symbol(struct hists *hists);
+void hists__filter_by_socket(struct hists *hists);
 
 static inline bool hists__has_filter(struct hists *hists)
 {

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [tip:perf/core] perf test: Add entry for hists socket filter
  2015-09-04 14:45 ` [PATCH 5/5] perf,test: test hists socket filter kan.liang
@ 2015-09-15  7:06   ` tip-bot for Kan Liang
  0 siblings, 0 replies; 17+ messages in thread
From: tip-bot for Kan Liang @ 2015-09-15  7:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: ak, eranian, jolsa, linux-kernel, tglx, acme, kan.liang,
	adrian.hunter, mingo, namhyung, hpa

Commit-ID:  92d424ae898e0d04ac34263aa33e40acc1e1f3d1
Gitweb:     http://git.kernel.org/tip/92d424ae898e0d04ac34263aa33e40acc1e1f3d1
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 4 Sep 2015 10:45:46 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 13:04:10 -0300

perf test: Add entry for hists socket filter

Add test case for hists socket filter.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1441377946-44429-5-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/hists_filter.c | 55 +++++++++++++++++++++++++++++++++--------
 1 file changed, 45 insertions(+), 10 deletions(-)

diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c
index ce48775..818acf8 100644
--- a/tools/perf/tests/hists_filter.c
+++ b/tools/perf/tests/hists_filter.c
@@ -16,30 +16,31 @@ struct sample {
 	struct thread *thread;
 	struct map *map;
 	struct symbol *sym;
+	int socket;
 };
 
 /* For the numbers, see hists_common.c */
 static struct sample fake_samples[] = {
 	/* perf [kernel] schedule() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, .socket = 0 },
 	/* perf [perf]   main() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_MAIN, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_MAIN, .socket = 0 },
 	/* perf [libc]   malloc() */
-	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, },
+	{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, .socket = 0 },
 	/* perf [perf]   main() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, }, /* will be merged */
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, .socket = 0 }, /* will be merged */
 	/* perf [perf]   cmd_record() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, },
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, .socket = 1 },
 	/* perf [kernel] page_fault() */
-	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_PAGE_FAULT, },
+	{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 1 },
 	/* bash [bash]   main() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_MAIN, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_MAIN, .socket = 2 },
 	/* bash [bash]   xmalloc() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_XMALLOC, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_BASH_XMALLOC, .socket = 2 },
 	/* bash [libc]   malloc() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_LIBC_MALLOC, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_LIBC_MALLOC, .socket = 3 },
 	/* bash [kernel] page_fault() */
-	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, },
+	{ .pid = FAKE_PID_BASH,  .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 3 },
 };
 
 static int add_hist_entries(struct perf_evlist *evlist,
@@ -83,6 +84,7 @@ static int add_hist_entries(struct perf_evlist *evlist,
 							  &sample) < 0)
 				goto out;
 
+			al.socket = fake_samples[i].socket;
 			if (hist_entry_iter__add(&iter, &al,
 						 PERF_MAX_STACK_DEPTH, NULL) < 0) {
 				addr_location__put(&al);
@@ -253,6 +255,39 @@ int test__hists_filter(void)
 		TEST_ASSERT_VAL("Unmatched total period for symbol filter",
 				hists->stats.total_non_filtered_period == 300);
 
+		/* remove symbol filter first */
+		hists->symbol_filter_str = NULL;
+		hists__filter_by_symbol(hists);
+
+		/* now applying socket filters */
+		hists->socket_filter = 2;
+		hists__filter_by_socket(hists);
+
+		if (verbose > 2) {
+			pr_info("Histogram for socket filters\n");
+			print_hists_out(hists);
+		}
+
+		/* normal stats should be invariant */
+		TEST_ASSERT_VAL("Invalid nr samples",
+				hists->stats.nr_events[PERF_RECORD_SAMPLE] == 10);
+		TEST_ASSERT_VAL("Invalid nr hist entries",
+				hists->nr_entries == 9);
+		TEST_ASSERT_VAL("Invalid total period",
+				hists->stats.total_period == 1000);
+
+		/* but filter stats are changed */
+		TEST_ASSERT_VAL("Unmatched nr samples for socket filter",
+				hists->stats.nr_non_filtered_samples == 2);
+		TEST_ASSERT_VAL("Unmatched nr hist entries for socket filter",
+				hists->nr_non_filtered_entries == 2);
+		TEST_ASSERT_VAL("Unmatched total period for socket filter",
+				hists->stats.total_non_filtered_period == 200);
+
+		/* remove socket filter first */
+		hists->socket_filter = -1;
+		hists__filter_by_socket(hists);
+
 		/* now applying all filters at once. */
 		hists->thread_filter = fake_samples[1].thread;
 		hists->dso_filter = fake_samples[1].map->dso;

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-09-15  7:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 14:45 [PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang
2015-09-04 14:45 ` [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang
2015-09-04 22:41   ` Arnaldo Carvalho de Melo
2015-09-04 22:52     ` Arnaldo Carvalho de Melo
2015-09-04 23:06       ` Arnaldo Carvalho de Melo
2015-09-04 23:25         ` Arnaldo Carvalho de Melo
2015-09-04 23:26           ` Arnaldo Carvalho de Melo
2015-09-04 23:30             ` Arnaldo Carvalho de Melo
2015-09-15  7:05   ` [tip:perf/core] perf tools: Introduce new sort type "socket" for the processor socket tip-bot for Kan Liang
2015-09-04 14:45 ` [PATCH 3/5] perf,report: introduce socket-filter option kan.liang
2015-09-15  7:05   ` [tip:perf/core] perf report: Introduce --socket-filter option tip-bot for Kan Liang
2015-09-04 14:45 ` [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang
2015-09-04 22:09   ` Andi Kleen
2015-09-15  7:06   ` [tip:perf/core] perf hists browser: Zoom in/ out " tip-bot for Kan Liang
2015-09-04 14:45 ` [PATCH 5/5] perf,test: test hists socket filter kan.liang
2015-09-15  7:06   ` [tip:perf/core] perf test: Add entry for " tip-bot for Kan Liang
2015-09-15  7:05 ` [tip:perf/core] perf tools: Add processor socket info to hist_entry and addr_location tip-bot for Kan Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).