Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1188694
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andy Lutomirski <luto@amacapital.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver |
| Date | Tue, 21 Jul 2015 08:30:01 +0200 |
| Message-ID | <pOzdT-bd-7@gated-at.bofh.it> (permalink) |
| References | <pOsm6-7eJ-19@gated-at.bofh.it> <pOwg1-4pd-1@gated-at.bofh.it> <pOyUx-8gm-9@gated-at.bofh.it> <pOzdT-bd-5@gated-at.bofh.it> |
| X-Original-To | Stephane Eranian <eranian@google.com> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=I6qrohZha+lutDQWNbJALy0mPlTy4hOC1UOEdhhuFVU=; b=CeRH2syqs6W3DTvjnKenRSnoufEpaLPPLZ5FZFPwmKOMW45p8VZWqUoF/bWQXJzeQe P554J+LfCDG0gXr0We3+5K6ScV3vA5qa04hcEtjs4cC1obiIYzDgGsPBcqJ2WjJzMguk /ukTRrr6CWv5VzNJvy2Ntz+KoqdcaLU5HcDq7gyRXLNGwwN1NkE6LLSciKlwQAqx7Qri tgb/9L43l5VR2ch7pSQq9kmq5Wxg074dgir50qqrZALkw3fE8D6Zl82oCh7Kp7sxinWD dtqtRjjCGgXYEi5jUd47f6o7gEVwXj98CeK6eLC63HXfUyboTTx1EFEBlOOjYl5HlXOJ QSxQ== |
| X-Gm-Message-State | ALoCoQlakuqvDe7ohAUiIbGesINPYnCTWN32AAKKf+lKGULYENME+/M0CFBVZvYL7TDFWUvcy5rj |
| X-Received | by 10.112.35.229 with SMTP id l5mr31765859lbj.0.1437459836188; Mon, 20 Jul 2015 23:23:56 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 50 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Kan Liang <kan.liang@intel.com>, Peter Zijlstra <a.p.zijlstra@chello.nl>, "mingo@redhat.com" <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, "ak@linux.intel.com" <ak@linux.intel.com>, Mark Rutland <mark.rutland@arm.com>, Adrian Hunter <adrian.hunter@intel.com>, David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, LKML <linux-kernel@vger.kernel.org>, Andy Lutomirski <luto@kernel.org> |
| X-Original-Date | Mon, 20 Jul 2015 23:23:36 -0700 |
| X-Original-Message-ID | <CALCETrVr8_dAg=19M3Lvewgp17qYJJfzyjjqD7aiy=c-6ROS-A@mail.gmail.com> |
| X-Original-References | <1437407346-31186-1-git-send-email-kan.liang@intel.com> <CABPqkBS8pBGyGmjd0uhDm0-hshVwZ_WdigB2+6qTEtCFv3Ugiw@mail.gmail.com> <CALCETrWR8hGQehwnnjq8=n9hk6S5uSe9UaRu-iKHXpz+emMWbw@mail.gmail.com> <CABPqkBRevqeP-yLtS=WB9i3rE9qByaYRXzZxgSM3QMoR5JmiRA@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1188694 |
Show key headers only | View raw
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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web