diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-31 10:34:41 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-31 11:11:30 +1100 |
commit | 1702eb3ab011b354ae914e60386ea85903257a23 (patch) | |
tree | 53911c24daec306dc49a7977c10f6094c2311491 /profile.c | |
parent | 9099972c20a49a96a0abac2ff2c4b163b59c6883 (diff) | |
download | subsurface-1702eb3ab011b354ae914e60386ea85903257a23.tar.gz |
Add the begin/end markers to events with the proper flags
When we create the event names, the name itself does not include the
information about whether the event is the beginning or end of some
state, so we end up having things like events named "deco" and then in
the event flags it says whether this is the *beginning* of deco, or the
end.
And when we show the event, we only used to show the name. This patch
makes us show whether it's the begin or end event for events that have
those flags. So now you see "deco begin" and "deco end" instead of just
two events both called "deco".
It would perhaps be nice if we somehow showed the range between the
events too, and paired them up visually some way, but that's a separate
and much more difficult thing to do.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -400,7 +400,9 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st snprintf(buffer, sizeof(buffer), "%s: %d", _(event->name), event->value); } } else { - snprintf(buffer, sizeof(buffer), "%s", _(event->name)); + snprintf(buffer, sizeof(buffer), "%s%s", _(event->name), + event->flags == SAMPLE_FLAGS_BEGIN ? " begin" : + event->flags == SAMPLE_FLAGS_END ? " end" : ""); } attach_tooltip(x-15, y-6, 12, 12, buffer); } |