From: Hemant Kumar <hemant@linux.vnet.ibm.com>
To: David Ahern <dsahern@gmail.com>, Scott Wood <scottwood@freescale.com>
Cc: Alexander Yarygin <yarygin@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
acme@kernel.org, sukadev@linux.vnet.ibm.com,
naveen.n.rao@linux.vnet.ibm.com, mpe@ellerman.id.au,
paulus@samba.org, mingo@redhat.com,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h
Date: Wed, 30 Sep 2015 23:44:04 +0530 [thread overview]
Message-ID: <560C266C.9070403@linux.vnet.ibm.com> (raw)
In-Reply-To: <56095AEA.8050002@gmail.com>
On 09/28/2015 08:51 PM, David Ahern wrote:
> On 9/28/15 9:16 AM, Scott Wood wrote:
>> On Mon, 2015-09-28 at 08:31 -0600, David Ahern wrote:
>>> On 9/28/15 7:00 AM, Alexander Yarygin wrote:
>>>>> diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
>>>>> index fc1cffb..ef25fcf 100644
>>>>> --- a/tools/perf/builtin-kvm.c
>>>>> +++ b/tools/perf/builtin-kvm.c
>>>>> @@ -31,20 +31,18 @@
>>>>> #include <math.h>
[SNIP]
>>>>> @@ -60,7 +58,7 @@ bool exit_event_begin(struct perf_evsel *evsel,
>>>>>
>>>>> bool kvm_entry_event(struct perf_evsel *evsel)
>>>>> {
>>>>> - return !strcmp(evsel->name, KVM_ENTRY_TRACE);
>>>>> + return !strncmp(evsel->name, kvm_events_tp[0],
>>>>> strlen(evsel->name));
>>>>> }
>>>>>
>>>>> bool exit_event_end(struct perf_evsel *evsel,
>>>
>>> I agree; don't rely on kvm_events_tp. Define KVM_ENTRY_TRACE and
>>> KVM_EXIT_TRACE like x86.
>>
>> If you mean defining them in uapi, that doesn't work for arches that
>> have
>> multiple subarches that may have different trace events. This patchset
>> doesn't actually implement dynamic support for the subarches, but it
>> avoids
>> adding constants to uapi headers that only apply to one of the
>> subarches.
>
> I don't agree on relying on kvm_events_tp[0] and [1]. If you need that
> to be a runtime definition then change KVM_ENTRY_TRACE to const char
> *kvm_entry_trace and s390 and other arches can have code to set
> kvm_{entry,exit}_trace at runtime.
>
Yeah, will change them to kvm_{entry,exit}_trace, instead.
--
Thanks,
Hemant Kumar
WARNING: multiple messages have this Message-ID (diff)
From: Hemant Kumar <hemant@linux.vnet.ibm.com>
To: David Ahern <dsahern@gmail.com>, Scott Wood <scottwood@freescale.com>
Cc: Alexander Yarygin <yarygin@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
acme@kernel.org, sukadev@linux.vnet.ibm.com,
naveen.n.rao@linux.vnet.ibm.com, mpe@ellerman.id.au,
paulus@samba.org, mingo@redhat.com,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH v8 1/4] perf,kvm/{x86,s390}: Remove dependency on uapi/kvm_perf.h
Date: Wed, 30 Sep 2015 23:44:04 +0530 [thread overview]
Message-ID: <560C266C.9070403@linux.vnet.ibm.com> (raw)
In-Reply-To: <56095AEA.8050002@gmail.com>
On 09/28/2015 08:51 PM, David Ahern wrote:
> On 9/28/15 9:16 AM, Scott Wood wrote:
>> On Mon, 2015-09-28 at 08:31 -0600, David Ahern wrote:
>>> On 9/28/15 7:00 AM, Alexander Yarygin wrote:
>>>>> diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
>>>>> index fc1cffb..ef25fcf 100644
>>>>> --- a/tools/perf/builtin-kvm.c
>>>>> +++ b/tools/perf/builtin-kvm.c
>>>>> @@ -31,20 +31,18 @@
>>>>> #include <math.h>
[SNIP]
>>>>> @@ -60,7 +58,7 @@ bool exit_event_begin(struct perf_evsel *evsel,
>>>>>
>>>>> bool kvm_entry_event(struct perf_evsel *evsel)
>>>>> {
>>>>> - return !strcmp(evsel->name, KVM_ENTRY_TRACE);
>>>>> + return !strncmp(evsel->name, kvm_events_tp[0],
>>>>> strlen(evsel->name));
>>>>> }
>>>>>
>>>>> bool exit_event_end(struct perf_evsel *evsel,
>>>
>>> I agree; don't rely on kvm_events_tp. Define KVM_ENTRY_TRACE and
>>> KVM_EXIT_TRACE like x86.
>>
>> If you mean defining them in uapi, that doesn't work for arches that
>> have
>> multiple subarches that may have different trace events. This patchset
>> doesn't actually implement dynamic support for the subarches, but it
>> avoids
>> adding constants to uapi headers that only apply to one of the
>> subarches.
>
> I don't agree on relying on kvm_events_tp[0] and [1]. If you need that
> to be a runtime definition then change KVM_ENTRY_TRACE to const char
> *kvm_entry_trace and s390 and other arches can have code to set
> kvm_{entry,exit}_trace at runtime.
>
Yeah, will change them to kvm_{entry,exit}_trace, instead.
--
Thanks,
Hemant Kumar
next prev parent reply other threads:[~2015-09-30 18:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 6:17 [PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h Hemant Kumar
2015-09-25 6:17 ` [PATCH v8 1/4] perf,kvm/{x86,s390}: " Hemant Kumar
2015-09-25 6:17 ` [PATCH v8 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp Hemant Kumar
2015-09-25 6:17 ` [PATCH v8 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc Hemant Kumar
2015-09-25 6:17 ` [PATCH v8 4/4] perf,kvm/powerpc: Add support for HCALL reasons Hemant Kumar
2015-09-28 13:00 ` [PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h Alexander Yarygin
2015-09-28 13:00 ` [PATCH v8 1/4] perf,kvm/{x86,s390}: " Alexander Yarygin
2015-09-28 14:31 ` David Ahern
2015-09-28 15:16 ` Scott Wood
2015-09-28 15:16 ` Scott Wood
2015-09-28 15:21 ` David Ahern
2015-09-30 18:14 ` Hemant Kumar [this message]
2015-09-30 18:14 ` Hemant Kumar
2015-09-30 18:12 ` [PATCH v8 1/4] perf, kvm/{x86, s390}: " Hemant Kumar
2015-09-30 18:12 ` [PATCH v8 1/4] perf,kvm/{x86,s390}: " Hemant Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=560C266C.9070403@linux.vnet.ibm.com \
--to=hemant@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=borntraeger@de.ibm.com \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=scottwood@freescale.com \
--cc=sukadev@linux.vnet.ibm.com \
--cc=yarygin@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.