diff options
Diffstat (limited to 'trace2')
-rw-r--r-- | trace2/tr2_sid.c | 2 | ||||
-rw-r--r-- | trace2/tr2_tgt_perf.c | 17 |
2 files changed, 3 insertions, 16 deletions
diff --git a/trace2/tr2_sid.c b/trace2/tr2_sid.c index 6948fd4108..dc6e75ef13 100644 --- a/trace2/tr2_sid.c +++ b/trace2/tr2_sid.c @@ -19,7 +19,7 @@ static int tr2sid_nr_git_parents; * "H<first_8_chars_of_sha1_of_hostname>" * "Localhost" when no hostname. * - * where <process> is a 9 character string containing the least signifcant + * where <process> is a 9 character string containing the least significant * 32 bits in the process-id. * "P<pid>" * (This is an abribrary choice. On most systems pid_t is a 32 bit value, diff --git a/trace2/tr2_tgt_perf.c b/trace2/tr2_tgt_perf.c index ffac8029ad..a8018f18cc 100644 --- a/trace2/tr2_tgt_perf.c +++ b/trace2/tr2_tgt_perf.c @@ -26,12 +26,9 @@ static int tr2env_perf_be_brief; #define TR2FMT_PERF_REPO_WIDTH (3) #define TR2FMT_PERF_CATEGORY_WIDTH (12) -#define TR2_DOTS_BUFFER_SIZE (100) #define TR2_INDENT (2) #define TR2_INDENT_LENGTH(ctx) (((ctx)->nr_open_regions - 1) * TR2_INDENT) -static struct strbuf dots = STRBUF_INIT; - static int fn_init(void) { int want = tr2_dst_trace_want(&tr2dst_perf); @@ -41,8 +38,6 @@ static int fn_init(void) if (!want) return want; - strbuf_addchars(&dots, '.', TR2_DOTS_BUFFER_SIZE); - brief = tr2_sysenv_get(TR2_SYSENV_PERF_BRIEF); if (brief && *brief && ((want_brief = git_parse_maybe_bool(brief)) != -1)) @@ -54,8 +49,6 @@ static int fn_init(void) static void fn_term(void) { tr2_dst_trace_disable(&tr2dst_perf); - - strbuf_release(&dots); } /* @@ -138,14 +131,8 @@ static void perf_fmt_prepare(const char *event_name, strbuf_addf(buf, "%-*.*s | ", TR2FMT_PERF_CATEGORY_WIDTH, TR2FMT_PERF_CATEGORY_WIDTH, (category ? category : "")); - if (ctx->nr_open_regions > 0) { - int len_indent = TR2_INDENT_LENGTH(ctx); - while (len_indent > dots.len) { - strbuf_addbuf(buf, &dots); - len_indent -= dots.len; - } - strbuf_addf(buf, "%.*s", len_indent, dots.buf); - } + if (ctx->nr_open_regions > 0) + strbuf_addchars(buf, '.', TR2_INDENT_LENGTH(ctx)); } static void perf_io_write_fl(const char *file, int line, const char *event_name, |