lkml.org 
[lkml]   [2013]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/6] perf report: Use pr_*() functions if possible
Date
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


\
 
 \ /
  Last update: 2013-12-20 03:01    [W:0.160 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site