Re: [PATCH] perf/x86/intel/pt: Export cpu frequency ratios needed by PT decoders

2015-08-31 Thread Andi Kleen
On Mon, Aug 31, 2015 at 03:59:08PM +0300, Alexander Shishkin wrote: > Andi Kleen writes: > > > Alexander Shishkin writes: > >> + return sprintf(page, "%lu\n", val); > >> + case 1: > >> + cpuid(0x15, &eax, &ebx, &ecx, &edx); > > > > Surely this needs to be protected by a cpuid

Re: [PATCH] perf/x86/intel/pt: Export cpu frequency ratios needed by PT decoders

2015-08-31 Thread Alexander Shishkin
Andi Kleen writes: > Alexander Shishkin writes: >> +return sprintf(page, "%lu\n", val); >> +case 1: >> +cpuid(0x15, &eax, &ebx, &ecx, &edx); > > Surely this needs to be protected by a cpuid level check? > Broadwell for once doesn't have CPUID 0x15. I couldn't find wh

Re: [PATCH] perf/x86/intel/pt: Export cpu frequency ratios needed by PT decoders

2015-08-28 Thread Andi Kleen
Alexander Shishkin writes: > + return sprintf(page, "%lu\n", val); > + case 1: > + cpuid(0x15, &eax, &ebx, &ecx, &edx); Surely this needs to be protected by a cpuid level check? Broadwell for once doesn't have CPUID 0x15. -Andi -- a...@linux.intel.com -- Speaking fo

[PATCH] perf/x86/intel/pt: Export cpu frequency ratios needed by PT decoders

2015-08-27 Thread Alexander Shishkin
In order for Intel PT decoders to infer correct crystal clock and bus frequencies that are required to correctly decode timing information from a PT stream (MTC and CBR packets), export them as sysfs attributes: * max_nonturbo_ratio: ratio between the invariant TSC and base clock; * tsc_art_ra