lkml.org 
[lkml]   [2013]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH 12/14] perf ftrace: Use pager for displaying result
Date
On Wed, 24 Apr 2013 16:17:24 +0200, Jiri Olsa wrote:
> On Tue, Apr 23, 2013 at 05:31:10PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@lge.com>
>>
>> It's convenient to use pager when seeing many lines of result.
>>
> for some reason I'm able to get any output for 'live' command only
> when using --no-pager option. I dont get any data for:
>
> # ./perf ftrace live ls
>
> not even ls output
>
> But sometime I dont even get ftrace output for:
>
> # ./perf --no-pager ftrace live ls
>
> just ls output
>
>
> I wonder there's some race with reading trace_pipe file,
> I haven't checked deeply yet..

It seems go_pipe in perf_evlist__prepare_workload() was closed due to
the pager process, so the workload ended up blocking indefinitely.

I guess other subcommands were not affected by this since record doesn't
use a pager, and show and report don't have a workload.

Does the patch below fix it?



diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 95f9a7fa3e04..3f3a684193e0 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -1486,12 +1486,12 @@ __cmd_ftrace_live(struct perf_ftrace *ftrace, int argc, const char **argv)
if (!argc && perf_target__none(&ftrace->target))
usage_with_options(live_usage, live_options);

+ setup_pager();
+
ret = ftrace_setup(ftrace, argc, argv);
if (ret < 0)
return ret;

- setup_pager();
-
ret = do_ftrace_live(ftrace);

ftrace_teardown(ftrace);

\
 
 \ /
  Last update: 2013-04-25 09:01    [W:0.082 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site