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]
Message-ID: <87r4hz7xal.fsf@sejong.aot.lge.com>
Date:	Thu, 25 Apr 2013 18:51:46 +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 05/14] perf tools: Introduce new 'ftrace' tool

On Thu, 25 Apr 2013 11:09:56 +0200, Jiri Olsa wrote:
> On Thu, Apr 25, 2013 at 03:06:37PM +0900, Namhyung Kim wrote:
>> On Wed, 24 Apr 2013 16:09:18 +0200, Jiri Olsa wrote:
>> > On Tue, Apr 23, 2013 at 05:31:03PM +0900, Namhyung Kim wrote:
>> >> From: Namhyung Kim <namhyung.kim@....com>
>> >> +out:
>> >> +	put_tracing_file(file);
>> >> +	return ret;
>> >> +}
>> >> +
>> >> +static int reset_tracing_files(struct perf_ftrace *ftrace __maybe_unused)
>> >> +{
>> >> +	if (write_tracing_file("tracing_on", "0") < 0)
>> >> +		return -1;
>> >> +
>> >> +	if (write_tracing_file("current_tracer", "nop") < 0)
>> >> +		return -1;
>> >> +
>> >> +	if (write_tracing_file("set_ftrace_pid", " ") < 0)
>> >> +		return -1;
>> >
>> > I think we want to reset set_ftrace_pid file as well
>> > probably to -1..
>> >
>> > if I'm tracing command with this file having wrong CPU(s)
>> > I dont get any data..
>> 
>> Not sure I understood what you mean exactly.
>
> ugh, sry.. I wrote set_ftrace_pid when I actually meant tracing_cpumask ;-)

Okay. :)

>
>> 
>> Do you mean it should be changed to
>> 
>> 	if (write_tracing_file("set_ftrace_pid", "-1") < 0)
>> 
>> ?  It seems it's the right thing to do for compatibility.
>
>
> looks like it's enough only to open it with O_TRUNC,
> so I guess whatever minimal goes write_tracing_file

Yeah, but I can see below from trace-cmd code.

trace-cmd/trace-record.c:

	/*
	 * Older kernels required "-1" to disable pid
	 */
	if (ret < 0 && !strlen(pid))
		ret = write(fd, "-1", 2);


Could you clarify this, Steve?

Thanks,
Namhyung
--
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