public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: kan.liang@intel.com
Cc: jolsa@kernel.org, namhyung@kernel.org, adrian.hunter@intel.com,
	eranian@google.com, ak@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] perf,tools: Support new sort type --socket
Date: Fri, 4 Sep 2015 20:26:18 -0300	[thread overview]
Message-ID: <20150904232618.GK3475@kernel.org> (raw)
In-Reply-To: <20150904232547.GJ3475@kernel.org>

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':

  reply	other threads:[~2015-09-04 23:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150904232618.GK3475@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox