Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1188687 > unrolled thread
| Started by | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| First post | 2015-07-21 08:10 +0200 |
| Last post | 2015-07-21 08:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver Andy Lutomirski <luto@amacapital.net> - 2015-07-21 08:10 +0200
Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver Stephane Eranian <eranian@google.com> - 2015-07-21 08:30 +0200
Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver Andy Lutomirski <luto@amacapital.net> - 2015-07-21 08:30 +0200
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2015-07-21 08:10 +0200 |
| Subject | Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver |
| Message-ID | <pOyUx-8gm-9@gated-at.bofh.it> |
On Mon, Jul 20, 2015 at 8:10 PM, Stephane Eranian <eranian@google.com> wrote:
> On Mon, Jul 20, 2015 at 8:49 AM, Kan Liang <kan.liang@intel.com> wrote:
>> From: Andy Lutomirski <luto@kernel.org>
>>
>> This patch adds freq PMU to support time and freq related counters
>> includes TSC, IA32_APERF, IA32_MPERF and IA32_PPERF.
>>
>> The events are exposed in sysfs for use by perf stat and other tools.
>> The files are under /sys/devices/freq/events/
>>
>> These events only support system-wide mode counting.
>>
>> The PMU type (attr->type) is PERF_TYPE_FREQ.
>>
>> Example:
>>
>> To caculate the CPU%
>> CPU_Utilization = CPU_CLK_UNHALTED.REF_TSC / TSC
>>
>> $ perf stat -e '{ref-cycles,freq/tsc/}' -C0 -- taskset -c 0 sleep 1
>> 3164023,,ref-cycles,1048387386,100.00
>> 2410812089,,freq/tsc/,1050022373,100.00
>> The CPU% for sleep is 0.13%.
>>
> This event is system-wide only. Thus, the kernel should return
> an error when you try to use it in per-thread mode. That would
> be more consistent with RAPL and uncore events.
I don't know enough about perf's inner workings to be sure, but can't
perf context switch free-running counters like this?
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Stephane Eranian <eranian@google.com> |
|---|---|
| Date | 2015-07-21 08:30 +0200 |
| Message-ID | <pOzdT-bd-5@gated-at.bofh.it> |
| In reply to | #1188687 |
On Mon, Jul 20, 2015 at 11:01 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Mon, Jul 20, 2015 at 8:10 PM, Stephane Eranian <eranian@google.com> wrote:
>> On Mon, Jul 20, 2015 at 8:49 AM, Kan Liang <kan.liang@intel.com> wrote:
>>> From: Andy Lutomirski <luto@kernel.org>
>>>
>>> This patch adds freq PMU to support time and freq related counters
>>> includes TSC, IA32_APERF, IA32_MPERF and IA32_PPERF.
>>>
>>> The events are exposed in sysfs for use by perf stat and other tools.
>>> The files are under /sys/devices/freq/events/
>>>
>>> These events only support system-wide mode counting.
>>>
>>> The PMU type (attr->type) is PERF_TYPE_FREQ.
>>>
>>> Example:
>>>
>>> To caculate the CPU%
>>> CPU_Utilization = CPU_CLK_UNHALTED.REF_TSC / TSC
>>>
>>> $ perf stat -e '{ref-cycles,freq/tsc/}' -C0 -- taskset -c 0 sleep 1
>>> 3164023,,ref-cycles,1048387386,100.00
>>> 2410812089,,freq/tsc/,1050022373,100.00
>>> The CPU% for sleep is 0.13%.
>>>
>> This event is system-wide only. Thus, the kernel should return
>> an error when you try to use it in per-thread mode. That would
>> be more consistent with RAPL and uncore events.
>
> I don't know enough about perf's inner workings to be sure, but can't
> perf context switch free-running counters like this?
>
It should be able to but your patch does not seem to do this. I get zero
count when I try.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2015-07-21 08:30 +0200 |
| Message-ID | <pOzdT-bd-7@gated-at.bofh.it> |
| In reply to | #1188693 |
On Mon, Jul 20, 2015 at 11:21 PM, Stephane Eranian <eranian@google.com> wrote:
> On Mon, Jul 20, 2015 at 11:01 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Mon, Jul 20, 2015 at 8:10 PM, Stephane Eranian <eranian@google.com> wrote:
>>> On Mon, Jul 20, 2015 at 8:49 AM, Kan Liang <kan.liang@intel.com> wrote:
>>>> From: Andy Lutomirski <luto@kernel.org>
>>>>
>>>> This patch adds freq PMU to support time and freq related counters
>>>> includes TSC, IA32_APERF, IA32_MPERF and IA32_PPERF.
>>>>
>>>> The events are exposed in sysfs for use by perf stat and other tools.
>>>> The files are under /sys/devices/freq/events/
>>>>
>>>> These events only support system-wide mode counting.
>>>>
>>>> The PMU type (attr->type) is PERF_TYPE_FREQ.
>>>>
>>>> Example:
>>>>
>>>> To caculate the CPU%
>>>> CPU_Utilization = CPU_CLK_UNHALTED.REF_TSC / TSC
>>>>
>>>> $ perf stat -e '{ref-cycles,freq/tsc/}' -C0 -- taskset -c 0 sleep 1
>>>> 3164023,,ref-cycles,1048387386,100.00
>>>> 2410812089,,freq/tsc/,1050022373,100.00
>>>> The CPU% for sleep is 0.13%.
>>>>
>>> This event is system-wide only. Thus, the kernel should return
>>> an error when you try to use it in per-thread mode. That would
>>> be more consistent with RAPL and uncore events.
>>
>> I don't know enough about perf's inner workings to be sure, but can't
>> perf context switch free-running counters like this?
>>
> It should be able to but your patch does not seem to do this. I get zero
> count when I try.
Peter, help? I'm guessing the fix is a line of two of code, but I
have no idea what line or two.
--Andy
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web