Re: [PATCH 1/6] perf report: Use pr_*() functions if possible
From: Namhyung Kim
Date: Thu Dec 19 2013 - 20:36:40 EST
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@xxxxxxx>
>>
>> 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@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
Thanks!
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/