[tip:perf/core] perf hists browser: Be a bit more strict about presenting CPU socket zoom

From: tip-bot for Namhyung Kim
Date: Wed Feb 03 2016 - 05:13:04 EST


Commit-ID: d9695d9f93649ecc00877ec2c847739c54a4cbb3
Gitweb: http://git.kernel.org/tip/d9695d9f93649ecc00877ec2c847739c54a4cbb3
Author: Namhyung Kim <namhyung@xxxxxxxxxx>
AuthorDate: Fri, 22 Jan 2016 12:20:18 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 26 Jan 2016 11:52:50 -0300

perf hists browser: Be a bit more strict about presenting CPU socket zoom

For consistency with the other sort order checks.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Tested-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>,
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1452960197-5323-9-git-send-email-namhyung@xxxxxxxxxx
[ Carved out from a larger patch, moved check to add_socket_opt() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/ui/browsers/hists.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index e892106..b919582 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1971,7 +1971,7 @@ static int
add_socket_opt(struct hist_browser *browser, struct popup_action *act,
char **optstr, int socket_id)
{
- if (socket_id < 0)
+ if (!sort__has_socket || socket_id < 0)
return 0;

if (asprintf(optstr, "Zoom %s Processor Socket %d",