lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Apr 2013 15:50:45 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	David Ahern <dsahern@...il.com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 12/14] perf ftrace: Use pager for displaying result

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@....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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ