From: Julien Desfossez Date: Thu, 8 Mar 2012 20:35:33 +0000 (-0500) Subject: fix perf name (now without underscore prefix) X-Git-Tag: v0.2~55 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6419078db4c549a21e906d5eefcd506b2087114e;p=lttngtop.git fix perf name (now without underscore prefix) Signed-off-by: Julien Desfossez --- diff --git a/src/cursesdisplay.c b/src/cursesdisplay.c index eb859af..81db0af 100644 --- a/src/cursesdisplay.c +++ b/src/cursesdisplay.c @@ -488,9 +488,9 @@ void update_perf() g_hash_table_iter_init(&iter, data->perf_list); while (g_hash_table_iter_next (&iter, &key, (gpointer) &perfn1)) { if (perfn1->visible) { - /* + 6 to strip the "_perf_" prefix */ + /* + 5 to strip the "perf_" prefix */ mvwprintw(center, 1, perf_row, "%s", - (char *) key + 6); + (char *) key + 5); perf_row += 20; } if (perfn1->sort) { diff --git a/src/lttngtop.c b/src/lttngtop.c index c4dc4ce..e4979eb 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -212,7 +212,7 @@ void extract_perf_counter_scope(struct bt_ctf_event *event, for (i = 0; i < count; i++) { const char *name = bt_ctf_field_name(list[i]); - if (strncmp(name, "_perf_", 6) == 0) { + if (strncmp(name, "perf_", 5) == 0) { int value = bt_ctf_get_uint64(list[i]); if (bt_ctf_field_get_error()) continue;