Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1219377

Re: [PATCH 2/5] perf,tools: Support new sort type --socket

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/5] perf,tools: Support new sort type --socket
Date 2015-09-05 01:30 +0200
Message-ID <q58AG-8fA-5@gated-at.bofh.it> (permalink)
References (1 earlier) <q57lg-6z4-19@gated-at.bofh.it> <q57XZ-7hG-35@gated-at.bofh.it> <q587E-7sW-1@gated-at.bofh.it> <q58hk-7TD-19@gated-at.bofh.it> <q58AG-8fA-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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':
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] perf,tools: add processor socket info in hist_entry and addr_location kan.liang@intel.com - 2015-09-05 00:10 +0200
  Re: [PATCH 4/5] perf,tools: zoom in/out for processor socket Andi Kleen <ak@linux.intel.com> - 2015-09-05 00:10 +0200
  [PATCH 4/5] perf,tools: zoom in/out for processor socket kan.liang@intel.com - 2015-09-05 00:10 +0200
  [PATCH 2/5] perf,tools: Support new sort type --socket kan.liang@intel.com - 2015-09-05 00:10 +0200
    Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 00:50 +0200
      Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 01:00 +0200
        Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 01:10 +0200
          Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 01:30 +0200
            Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 01:40 +0200
          Re: [PATCH 2/5] perf,tools: Support new sort type --socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-05 01:30 +0200
  [PATCH 3/5] perf,report: introduce socket-filter option kan.liang@intel.com - 2015-09-05 00:10 +0200
  [PATCH 5/5] perf,test: test hists socket filter kan.liang@intel.com - 2015-09-05 00:10 +0200

csiph-web