Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1199352
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/8] perf, tools: Remove trail argument to color vsprintf |
| Date | 2015-08-04 03:00 +0200 |
| Message-ID | <pTyKf-322-23@gated-at.bofh.it> (permalink) |
| References | <pTyKe-322-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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: Andi Kleen <ak@linux.intel.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 55355b3..ff051d2 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 38146f9..a93997f 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.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
perf, tools: Refactor and support interval and CSV metrics v2 Andi Kleen <andi@firstfloor.org> - 2015-08-04 03:00 +0200 [PATCH 1/8] perf, tools: Remove trail argument to color vsprintf Andi Kleen <andi@firstfloor.org> - 2015-08-04 03:00 +0200 [PATCH 7/8] perf, tools, stat: Implement CSV metrics output Andi Kleen <andi@firstfloor.org> - 2015-08-04 03:00 +0200 [PATCH 5/8] perf, tools, stat: Add support for metrics in interval mode Andi Kleen <andi@firstfloor.org> - 2015-08-04 03:00 +0200 [PATCH 3/8] perf, tools, stat: Move sw clock metrics printout to stat-shadow Andi Kleen <andi@firstfloor.org> - 2015-08-04 03:00 +0200
csiph-web