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:	Tue, 10 May 2011 10:09:18 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	David Sharp <dhsharp@...gle.com>,
	Vaibhav Nagarnaik <vnagarnaik@...gle.com>,
	Michael Rubin <mrubin@...gle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Christoph Hellwig <hch@...radead.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: Fix powerTOP regression with 2.6.39-rc5


* Steven Rostedt <rostedt@...dmis.org> wrote:

> > > > PowerTop uses the perf ABI because it's a rather convenient and unified 
> > > > method to get a rich selection of events via the same facility, same 
> > > > ring-buffer, using a system call ABI, etc.
> > > 
> > > It seams that Arjan read the perf kernel code to see how the raw data was 
> > > laid out and read it directly.
> > 
> > Yes, of course - i also have code that uses the syscall directly, it's 
> > easier to code up ad-hoc than to parse some XML-lookalike descriptor from 
> > /debug/tracing/events/.
> 
> So you admit this is a ad-hoc way of doing things. [...]

There's nothing wrong with being able to code and make use of instrumentation 
ad-hoc, using a simple interface.

The *worst* possible thing is to force user-space to use something complex.
So we kept the perf ABI simple.

> [...] Thus a library is a perfect solution. [...]

That's a non sequitor.

> [...] And the event formats are far from XML-look-a-like. You really think 
> this:
> 
> name: sched_switch
> ID: 57
> format:
> 	field:unsigned short common_type;	offset:0;	size:2;
> 	field:unsigned char common_flags;	offset:2;	size:1;
> 	field:unsigned char common_preempt_count;	offset:3;	size:1;
> 	field:int common_pid;	offset:4;	size:4;
> 	field:int common_lock_depth;	offset:8;	size:4;
> 
> 	field:char prev_comm[TASK_COMM_LEN];	offset:12;	size:16;
> 	field:pid_t prev_pid;	offset:28;	size:4;
> 	field:int prev_prio;	offset:32;	size:4;
> 	field:long prev_state;	offset:40;	size:8;
> 	field:char next_comm[TASK_COMM_LEN];	offset:48;	size:16;
> 	field:pid_t next_pid;	offset:64;	size:4;
> 	field:int next_prio;	offset:68;	size:4;
> 
> Is equivalent to this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <KernelShark><CaptureSettings><Events><CaptureType>Events</CaptureType><System>sched</System></Events><Plugin>function_graph</Plugin><File>/tmp/trace.dat</File></CaptureSettings></KernelShark>

I did not say that it's equivalent, i said it's XML look-alike.

Steve, we even joked about that, that if we continue like this we'll end up 
with an XML parser ... I requested several changes to the description format so 
that it becomes more human readable.

Thanks,

	Ingo
--
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