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: <20090720114720.GB9029@kryten>
Date:	Mon, 20 Jul 2009 21:47:20 +1000
From:	Anton Blanchard <anton@...ba.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	mingo@...e.hu, paulus@...ba.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf_counter: Always return the parent counter id to
	userspace


Hi Peter,
 
> Please add -p to your diff args, or use
> QUILT_DIFF_OPTS="--show-c-function".

Sorry about that, I lost my .quiltrc somewhere along the line.

> > @@ -2704,8 +2718,10 @@
> >  	if (sample_type & PERF_SAMPLE_ADDR)
> >  		perf_output_put(&handle, data->addr);
> >  
> > -	if (sample_type & PERF_SAMPLE_ID)
> > -		perf_output_put(&handle, counter->id);
> > +	if (sample_type & PERF_SAMPLE_ID) {
> > +		u64 id = primary_counter_id(counter);
> > +		perf_output_put(&handle, id);
> > +	}
> >  
> >  	if (sample_type & PERF_SAMPLE_CPU)
> >  		perf_output_put(&handle, cpu_entry);
> 
> This will actually wreck things.
> 
> It would be impossible to relate PERF_EVENT_PERIOD/THROTTLE (and maybe
> others) to their respective counters.
> 
> If you have inherited counters and each task will have separate ones,
> you need separate IDs in their sample stream to be able to related
> PERIOD and THROTTLE events.

I think I'm missing something. I'm logging two events at once with perf record
(-e page-faults -e dTLB-load-misses) and I added PERF_SAMPLE_ID to be able to
identify each event in the output file.

I'm not seeing a way to inherit and share counters (so we always get a
consistent id which matches the perf.data header), or a way for the new
counters to be written out to the log as they are created (so I can work
back to the original id).

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