diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-14 14:23:53 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-14 14:23:53 -0300 |
commit | 6d4af9247f53eb137d40dfa67391c4cc5586c37c (patch) | |
tree | 537d69b0d06292e4a0dada5d260095a5c1be8da8 | |
parent | edefd690b1c0d92088ecd6285d85b32fee49f474 (diff) | |
download | tuna-6d4af9247f53eb137d40dfa67391c4cc5586c37c.tar.gz |
procview: Remove 'cycles' column when using perf events
We need to present it in some better way, like its done in 'perf top',
decaying over time and providing a percentage, not just a raw cycles
count.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tuna/gui/procview.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tuna/gui/procview.py b/tuna/gui/procview.py index c2b82b5..88d46f9 100755 --- a/tuna/gui/procview.py +++ b/tuna/gui/procview.py @@ -233,17 +233,16 @@ class procview: gui.list_store_column(_("Affinity"), gobject.TYPE_STRING), gui.list_store_column(_("Command Line"), gobject.TYPE_STRING)) elif self.evlist: # habemus perf, so lets use the metric we're collecting - self.nr_columns = 8 + self.nr_columns = 7 ( self.COL_PID, self.COL_POL, self.COL_PRI, self.COL_AFF, self.COL_VOLCTXT, self.NONVOLCTXT, - self.COL_PERF, self.COL_CMDLINE ) = range(self.nr_columns) + self.COL_CMDLINE ) = range(self.nr_columns) self.columns = (gui.list_store_column(_("PID")), gui.list_store_column(_("Policy"), gobject.TYPE_STRING), gui.list_store_column(_("Priority")), gui.list_store_column(_("Affinity"), gobject.TYPE_STRING), gui.list_store_column(_("VolCtxtSwitch"), gobject.TYPE_UINT), gui.list_store_column(_("NonVolCtxtSwitch"), gobject.TYPE_UINT), - gui.list_store_column(_("Cycles"), gobject.TYPE_UINT), gui.list_store_column(_("Command Line"), gobject.TYPE_STRING)) self.tree_store = gtk.TreeStore(*gui.generate_list_store_columns_with_attr(self.columns)) @@ -319,10 +318,8 @@ class procview: self.thread_map = perf.thread_map() self.evsel_cycles = perf.evsel(task = 1, comm = 1, wakeup_events = 1, - sample_period = 1, - sample_id_all = 1, - sample_type = perf.SAMPLE_PERIOD | - perf.SAMPLE_CPU | + watermark = 1, + sample_type = perf.SAMPLE_CPU | perf.SAMPLE_TID) self.evsel_cycles.open(cpus = self.cpu_map, threads = self.thread_map); self.evlist = perf.evlist(self.cpu_map, self.thread_map) @@ -380,10 +377,6 @@ class procview: try: new_value[self.COL_VOLCTXT] = int(thread_info["status"]["voluntary_ctxt_switches"]) new_value[self.COL_NONVOLCTXT] = int(thread_info["status"]["nonvoluntary_ctxt_switches"]) - try: - new_value[self.COL_PERF] = self.perf_counter[tid] - except: - new_value[self.COL_PERF] = 0 except: pass |