All of lore.kernel.org
 help / color / mirror / Atom feed
* s390 perf events JSONs query
@ 2018-04-20 10:51 John Garry
  2018-04-20 11:44 ` Thomas-Mich Richter
  2018-04-20 13:25 ` Thomas-Mich Richter
  0 siblings, 2 replies; 6+ messages in thread
From: John Garry @ 2018-04-20 10:51 UTC (permalink / raw)
  To: brueckner, tmricht
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Linuxarm,
	linux-kernel, Will Deacon

Hi Hendrik, Thomas,

I noticed that in 4.17-rc1 support was included for s390 perf 
pmu-events. I also notice that the JSONs contain many common (identical 
actually) events between different chips for this arch.

Support was added for factoring out common arch events in 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac

ARM64 chips use this feature. I am not familiar with the s390 arch, but 
do you think you could also use this feature?

Thanks,
John

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: s390 perf events JSONs query
  2018-04-20 10:51 s390 perf events JSONs query John Garry
@ 2018-04-20 11:44 ` Thomas-Mich Richter
  2018-04-20 12:34   ` John Garry
  2018-04-20 13:25 ` Thomas-Mich Richter
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas-Mich Richter @ 2018-04-20 11:44 UTC (permalink / raw)
  To: John Garry, brueckner, tmricht
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Linuxarm,
	linux-kernel, Will Deacon

On 04/20/2018 12:51 PM, John Garry wrote:
> Hi Hendrik, Thomas,
> 
> I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch.
> 
> Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac
> 
> ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature?
> 
> Thanks,
> John
> 

Thanks John,

for bringing this to my attention. Yes I will definitely look into this feature and will try to
rework our s390 json files when this seems beneficial.

I did not notice this patch on the linux-perf-users mailing list. Was it there for review?
I do ask this because recently I have nearly no traffic on this list in my reader, so I wonder
if there is something wrong with my mailing list subscription or setup.

Thanks.

-- 
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: s390 perf events JSONs query
  2018-04-20 11:44 ` Thomas-Mich Richter
@ 2018-04-20 12:34   ` John Garry
  0 siblings, 0 replies; 6+ messages in thread
From: John Garry @ 2018-04-20 12:34 UTC (permalink / raw)
  To: Thomas-Mich Richter, brueckner, tmricht, Peter Zijlstra,
	Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: Alexander Shishkin, Jiri Olsa, Namhyung Kim, Linuxarm,
	linux-kernel, Will Deacon

On 20/04/2018 12:44, Thomas-Mich Richter wrote:
> On 04/20/2018 12:51 PM, John Garry wrote:
>> Hi Hendrik, Thomas,
>>
>> I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch.
>>
>> Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac
>>
>> ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature?
>>
>> Thanks,
>> John
>>
>
> Thanks John,
>
> for bringing this to my attention. Yes I will definitely look into this feature and will try to
> rework our s390 json files when this seems beneficial.
>
> I did not notice this patch on the linux-perf-users mailing list. Was it there for review?
> I do ask this because recently I have nearly no traffic on this list in my reader, so I wonder
> if there is something wrong with my mailing list subscription or setup.
>

Hi Thomas,

The only relevant list was linux-kernel@vger.kernel.org

This is the only list which the MAINTAINERS file advises to add. I did 
wonder about a dedicated perf list, as I seem to miss mails also.

Hi Peter, Ingo, Arnaldo,

Should linux-perf-users address be added for perf-related patches? If 
so, should we add it to the maintainers file? If not, why no dedicated list?

Thanks,
John

> Thanks.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: s390 perf events JSONs query
  2018-04-20 10:51 s390 perf events JSONs query John Garry
  2018-04-20 11:44 ` Thomas-Mich Richter
@ 2018-04-20 13:25 ` Thomas-Mich Richter
  2018-04-20 13:53   ` John Garry
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas-Mich Richter @ 2018-04-20 13:25 UTC (permalink / raw)
  To: John Garry, brueckner, tmricht
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Linuxarm,
	linux-kernel, Will Deacon

On 04/20/2018 12:51 PM, John Garry wrote:
> Hi Hendrik, Thomas,
> 
> I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch.
> 
> Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac
> 
> ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature?
> 
> Thanks,
> John
> 

I have just played with this feature. I was caught off by this error message:

[root@s35lp76 pmu-events]# ./jevents s390 arch /tmp/xxx 100000
d 0    4096 s390                 arch/s390
d 1    4096 cf_z14               arch/s390/cf_z14
f 2    1338 basic.json           arch/s390/cf_z14/basic.json
....
jevents: Ignoring file arch/s390/archevent.json  <---- confusing error message

jevents: Processing mapfile arch/s390/mapfile.csv
[root@s35lp76 pmu-events]# 

I started debugging, until I realized this file is still processed.....
(Just a side remark).

Anyway the features is nice, but it does not save anything in the resulting
pmu-events.c file, correct? The events defined in the common archevent.json
files are just copied into the structures of a specific machine.

The feature saves time and space when you create the machine specific json
files because it allows you to refer to a common event by name. Cool!

On s390 we do not create the json files manually, but have some scripts to
create them based on s390 type/model hardware specific input files.

@Hendirk,
we could rework our internal tool chain to emit the new "ArchStdEvent"
keyword for common events, but in the end we do not save anything in the
resulting pmu-events.c file. And it requires considerable rework to 
support it.
Given that, I would put it very low priority on your todo list, comments?

-- 
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: s390 perf events JSONs query
  2018-04-20 13:25 ` Thomas-Mich Richter
@ 2018-04-20 13:53   ` John Garry
  2018-04-20 14:13     ` Hendrik Brueckner
  0 siblings, 1 reply; 6+ messages in thread
From: John Garry @ 2018-04-20 13:53 UTC (permalink / raw)
  To: Thomas-Mich Richter, brueckner, tmricht
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Linuxarm,
	linux-kernel, Will Deacon

On 20/04/2018 14:25, Thomas-Mich Richter wrote:
> On 04/20/2018 12:51 PM, John Garry wrote:
>> Hi Hendrik, Thomas,
>>
>> I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch.
>>
>> Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac
>>
>> ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature?
>>
>> Thanks,
>> John
>>
>
> I have just played with this feature. I was caught off by this error message:
>
> [root@s35lp76 pmu-events]# ./jevents s390 arch /tmp/xxx 100000
> d 0    4096 s390                 arch/s390
> d 1    4096 cf_z14               arch/s390/cf_z14
> f 2    1338 basic.json           arch/s390/cf_z14/basic.json
> ....
> jevents: Ignoring file arch/s390/archevent.json  <---- confusing error message

Let me check if this can be silenced.

>
> jevents: Processing mapfile arch/s390/mapfile.csv
> [root@s35lp76 pmu-events]#
>
> I started debugging, until I realized this file is still processed.....
> (Just a side remark).
>
> Anyway the features is nice, but it does not save anything in the resulting
> pmu-events.c file, correct? The events defined in the common archevent.json
> files are just copied into the structures of a specific machine.
>

Yes, the resulting derived pmu-events.c should be the same. In fact, if 
there was naming inconsistencies in JSONs previously, they should now be 
gone.

> The feature saves time and space when you create the machine specific json
> files because it allows you to refer to a common event by name. Cool!
>
> On s390 we do not create the json files manually, but have some scripts to
> create them based on s390 type/model hardware specific input files.

Right, I would say that this is mostly useful when the JSONs are created 
manually, which was the case in the ARM world, but not x86. I didn't 
know about s390.

>
> @Hendirk,
> we could rework our internal tool chain to emit the new "ArchStdEvent"
> keyword for common events, but in the end we do not save anything in the
> resulting pmu-events.c file. And it requires considerable rework to
> support it.
> Given that, I would put it very low priority on your todo list, comments?
>

Cheers,
John

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: s390 perf events JSONs query
  2018-04-20 13:53   ` John Garry
@ 2018-04-20 14:13     ` Hendrik Brueckner
  0 siblings, 0 replies; 6+ messages in thread
From: Hendrik Brueckner @ 2018-04-20 14:13 UTC (permalink / raw)
  To: John Garry
  Cc: Thomas-Mich Richter, brueckner, tmricht, Peter Zijlstra,
	Ingo Molnar, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Linuxarm, linux-kernel, Will Deacon

Hi John,

On Fri, Apr 20, 2018 at 02:53:27PM +0100, John Garry wrote:
> On 20/04/2018 14:25, Thomas-Mich Richter wrote:
> >On 04/20/2018 12:51 PM, John Garry wrote:
> >>I noticed that in 4.17-rc1 support was included for s390 perf pmu-events. I also notice that the JSONs contain many common (identical actually) events between different chips for this arch.
> >>
> >>Support was added for factoring out common arch events in https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/tools/perf/pmu-events?h=next-20180420&id=e9d32c1bf0cd7a98358ec4aa1625bf2b3459b9ac
> >>
> >>ARM64 chips use this feature. I am not familiar with the s390 arch, but do you think you could also use this feature?
> >>
> >>Thanks,
> >>John
> >>
> >
> >I have just played with this feature. I was caught off by this error message:
> >
> >[root@s35lp76 pmu-events]# ./jevents s390 arch /tmp/xxx 100000
> >d 0    4096 s390                 arch/s390
> >d 1    4096 cf_z14               arch/s390/cf_z14
> >f 2    1338 basic.json           arch/s390/cf_z14/basic.json
> >....
> >jevents: Ignoring file arch/s390/archevent.json  <---- confusing error message
> 
> Let me check if this can be silenced.
> 
> >
> >jevents: Processing mapfile arch/s390/mapfile.csv
> >[root@s35lp76 pmu-events]#
> >
> >I started debugging, until I realized this file is still processed.....
> >(Just a side remark).
> >
> >Anyway the features is nice, but it does not save anything in the resulting
> >pmu-events.c file, correct? The events defined in the common archevent.json
> >files are just copied into the structures of a specific machine.
> >
> 
> Yes, the resulting derived pmu-events.c should be the same. In fact,
> if there was naming inconsistencies in JSONs previously, they should
> now be gone.
> 
> >The feature saves time and space when you create the machine specific json
> >files because it allows you to refer to a common event by name. Cool!
> >
> >On s390 we do not create the json files manually, but have some scripts to
> >create them based on s390 type/model hardware specific input files.
> 
> Right, I would say that this is mostly useful when the JSONs are
> created manually, which was the case in the ARM world, but not x86.

It is really the right way and the coolest feature to go when the JSONs need
to be created manually.

For s390, I started manually with adding descriptions for the libpfm4 library.
Then, the events sysfs came up and that was the point in time when I created
a common database for the counters in the s390-tools package.  Meanwhile,
s390-tools, libpfm4, kernel, and Thomas recently added perf JSONs as possible
outputs formats.

> >@Hendrik,
> >we could rework our internal tool chain to emit the new "ArchStdEvent"
> >keyword for common events, but in the end we do not save anything in the
> >resulting pmu-events.c file. And it requires considerable rework to
> >support it.
> >Given that, I would put it very low priority on your todo list, comments?

I would consider this a low-priority given the fact that have to overwrite
to the counter number (for the model-dependent counters) as well.

Many thanks!
 
Kind regards,
  Hendrik

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-20 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 10:51 s390 perf events JSONs query John Garry
2018-04-20 11:44 ` Thomas-Mich Richter
2018-04-20 12:34   ` John Garry
2018-04-20 13:25 ` Thomas-Mich Richter
2018-04-20 13:53   ` John Garry
2018-04-20 14:13     ` Hendrik Brueckner

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.