Skip to content

Commit

Permalink
trace2: trim whitespace in region messages in perf target format
Browse files Browse the repository at this point in the history
Trim trailing whitespace in "region_enter" and "region_leave"
messages in perf target format.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler committed Jul 30, 2019
1 parent 834ee95 commit d2f7cf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trace2/tr2_tgt_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ static void fn_region_enter_printf_va_fl(const char *file, int line,
if (label)
strbuf_addf(&buf_payload, "label:%s ", label);
maybe_append_string_va(&buf_payload, fmt, ap);
strbuf_rtrim(&buf_payload);

perf_io_write_fl(file, line, event_name, repo, &us_elapsed_absolute,
NULL, category, &buf_payload);
Expand All @@ -472,6 +473,7 @@ static void fn_region_leave_printf_va_fl(
if (label)
strbuf_addf(&buf_payload, "label:%s ", label);
maybe_append_string_va(&buf_payload, fmt, ap);
strbuf_rtrim(&buf_payload);

perf_io_write_fl(file, line, event_name, repo, &us_elapsed_absolute,
&us_elapsed_region, category, &buf_payload);
Expand Down

0 comments on commit d2f7cf3

Please sign in to comment.