Messages in this thread | | | From | Namhyung Kim <> | Subject | Re: [PATCH 1/6] perf report: Use pr_*() functions if possible | Date | Fri, 20 Dec 2013 10:36:34 +0900 |
| |
Hi Jiri,
On Thu, 19 Dec 2013 14:31:54 +0100, Jiri Olsa wrote: > On Thu, Dec 19, 2013 at 04:00:06PM +0900, Namhyung Kim wrote: >> From: Namhyung Kim <namhyung.kim@lge.com> >> >> There're some places printing a message to stdout/err directly. It >> should be converted to use proper error printing functions instead. >> >> If it's not possible, just do it when --stdio was enabled only. >> >> Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > Maybe it'd be worthwhile to factor perf_session__fprintf* > functions so the info could end up in the log window.
I thought about it too. And then considered something like below:
FILE *sfp = open_memstream(&ptr, &size); perf_session__fprintf*(session, sfp, ...); fclose(sfp);
perf_log_add(ptr); fprintf(orig_fp, "%s", ptr);
free(ptr);
What do you think?
> > Acked-by: Jiri Olsa <jolsa@redhat.com>
Thanks! Namhyung
| |