Re: [PATCH 8/9] perf,tools: caculate and save tsc/avg/bzy freq in he_stat

2015-07-17 Thread Andi Kleen
> The concept of tsc, avg and bzy are from turbostat. > Here is the definition from turbostat readme. turbostat can do this because it is model specific, but perf user code is not. It has to be architectural definitions only. And the architectural definition of ASTATE MSTATE in the SDM is that it

RE: [PATCH 8/9] perf,tools: caculate and save tsc/avg/bzy freq in he_stat

2015-07-17 Thread Liang, Kan
> > > + if (sample->read.time_running > 0) { > > + freq.tsc_freq = (1000 * sample->tsc) / sample- > >read.time_running; > > + freq.avg_freq = (1000 * sample->aperf) / sample- > >read.time_running; > > + if (sample->aperf > 0) > > + freq.bzy_freq =

Re: [PATCH 8/9] perf,tools: caculate and save tsc/avg/bzy freq in he_stat

2015-07-17 Thread Andi Kleen
> + if (sample->read.time_running > 0) { > + freq.tsc_freq = (1000 * sample->tsc) / > sample->read.time_running; > + freq.avg_freq = (1000 * sample->aperf) / > sample->read.time_running; > + if (sample->aperf > 0) > + freq.bzy_freq = fre