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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
2e7ea3ab82
commit
21394d948a
@@ -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);
|
||||
|
Reference in New Issue
Block a user