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] [day] [month] [year] [list]
Message-ID: <m3y687rj7h.fsf@gmail.com>
Date:	Thu, 02 Dec 2010 21:52:18 +0100
From:	Franck Bui-Huu <vagabon.xyz@...il.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Franck Bui-Huu <vagabon.xyz@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Francis Moreau <francis.moro@...il.com>
Subject: Re: perf: some questions about perf software events

Peter Zijlstra <a.p.zijlstra@...llo.nl> writes:

> On Sat, 2010-11-27 at 14:28 +0100, Franck Bui-Huu wrote:

[...]

>> 
>> Does it make sense to adjust the period for both of them ?
>> 
>> Also, when creating a task clock event, passing 'pid=-1' to
>> sys_perf_event_open() doesn't really make sense, does it ?
>> 
>> Same with cpu clock and 'pid=n': whatever <n> value, the event measure
>> the cpu wall time clock.
>> 
>> Perhaps proposing only one clock in the API and internally bind this
>> clock to the cpu or task clock depending on pid or cpu parameters would
>> have been better ?
>> 
>
> No, it actually makes sense to count both cpu and task clock on a task
> (cpu clock basically being wall-time).
>

But a task can create several instances of the same events, no ?

For HW events, they'll use counters that support the type of these
events and if there are not enough of them then those events will share
the counters in a round robin fashion.

For SW events, there's no limit at all.

So doing:

   attr.type   = PERF_TYPE_SOFTWARE;
   attr.config = PERF_COUNT_SW_ClOCK;
   /* ... */
   tsk_clock_fd = sys_perf_event_open(&attr, 0, -1, -1, 0);
   cpu_clock_fd = sys_perf_event_open(&attr, -1, 0, -1, 0);

should be allowed.

No ?
-- 
		Franck
--
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