From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Jiri Olsa <jolsa@kernel.org>, Andi Kleen <ak@linux.intel.com>,
Stephane Eranian <eranian@google.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 09/12] perf tools: Remove trail argument to color vsprintf
Date: Wed, 5 Aug 2015 17:11:35 -0300 [thread overview]
Message-ID: <1438805498-24993-10-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1438805498-24993-1-git-send-email-acme@kernel.org>
From: Jiri Olsa <jolsa@redhat.com>
Seems like it's always '\n' through color_fprintf_ln, which is not used
at all, removing.. ;-)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1438649408-20807-2-git-send-email-andi@firstfloor.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/color.c | 16 ++--------------
tools/perf/util/color.h | 1 -
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c
index 55355b3d4f85..ff051d24a0bb 100644
--- a/tools/perf/util/color.c
+++ b/tools/perf/util/color.c
@@ -68,7 +68,7 @@ static int __color_vsnprintf(char *bf, size_t size, const char *color,
}
static int __color_vfprintf(FILE *fp, const char *color, const char *fmt,
- va_list args, const char *trail)
+ va_list args)
{
int r = 0;
@@ -87,8 +87,6 @@ static int __color_vfprintf(FILE *fp, const char *color, const char *fmt,
r += vfprintf(fp, fmt, args);
if (perf_use_color_default && *color)
r += fprintf(fp, "%s", PERF_COLOR_RESET);
- if (trail)
- r += fprintf(fp, "%s", trail);
return r;
}
@@ -100,7 +98,7 @@ int color_vsnprintf(char *bf, size_t size, const char *color,
int color_vfprintf(FILE *fp, const char *color, const char *fmt, va_list args)
{
- return __color_vfprintf(fp, color, fmt, args, NULL);
+ return __color_vfprintf(fp, color, fmt, args);
}
int color_snprintf(char *bf, size_t size, const char *color,
@@ -126,16 +124,6 @@ int color_fprintf(FILE *fp, const char *color, const char *fmt, ...)
return r;
}
-int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...)
-{
- va_list args;
- int r;
- va_start(args, fmt);
- r = __color_vfprintf(fp, color, fmt, args, "\n");
- va_end(args);
- return r;
-}
-
/*
* This function splits the buffer by newlines and colors the lines individually.
*
diff --git a/tools/perf/util/color.h b/tools/perf/util/color.h
index 38146f922c54..a93997f16dec 100644
--- a/tools/perf/util/color.h
+++ b/tools/perf/util/color.h
@@ -35,7 +35,6 @@ int color_vsnprintf(char *bf, size_t size, const char *color,
int color_vfprintf(FILE *fp, const char *color, const char *fmt, va_list args);
int color_fprintf(FILE *fp, const char *color, const char *fmt, ...);
int color_snprintf(char *bf, size_t size, const char *color, const char *fmt, ...);
-int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...);
int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf);
int value_color_snprintf(char *bf, size_t size, const char *fmt, double value);
int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...);
--
2.1.0
next prev parent reply other threads:[~2015-08-05 20:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 20:11 [GIT PULL 00/12] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 01/12] perf script: No tracepoints? Don't call libtraceevent Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 02/12] perf trace: Do not show syscall tracepoint filter in the --no-syscalls case Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 03/12] perf trace: Remember if the vfs_getname tracepoint/kprobe is in place Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 04/12] perf trace: Use a constant for the syscall formatting buffer Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 05/12] perf trace: Deref sys_enter pointer args with contents from probe:vfs_getname Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 06/12] perf trace: Use vfs_getname syscall arg beautifier in more syscalls Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 07/12] perf tools: Per-event time support Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 08/12] perf tools: Refine parse/config callchain functions Arnaldo Carvalho de Melo
2015-08-05 20:11 ` Arnaldo Carvalho de Melo [this message]
2015-08-05 20:11 ` [PATCH 10/12] perf tools: Do not include escape sequences in color_vfprintf return Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 11/12] perf trace: Write to stderr by default Arnaldo Carvalho de Melo
2015-08-05 20:11 ` [PATCH 12/12] perf tools: Fix build errors with mipsel-linux-uclibc compiler Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438805498-24993-10-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).