* [gprofng] Adding a new CPU architecture
@ 2022-03-22 11:52 Thomas Gruber
2022-03-22 16:05 ` Vladimir Mezentsev
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Gruber @ 2022-03-22 11:52 UTC (permalink / raw)
To: binutils
Hi,
I tried to add Fujitsu A64FX hardware performance event support to
gprofng but didn't find a contributing guide. The comments in the code
and the code structure itself didn't help much in my understanding.
Just adding the event list is probably not enough since the A64FX is not
detected properly yet by gprofng, so extending the CPU detection is also
required.
Are there some hints how to add a new architecture to gprofng?
Best,
Thomas
--
Thomas Gruber
Software & Tools
Erlangen National High Performance Computing Center (NHR@FAU)
Friedrich-Alexander University Erlangen-Nürnberg
Martensstraße 1, 91058 Erlangen, Germany
mailto:Thomas.Gruber@fau.de
https://hpc.fau.de/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gprofng] Adding a new CPU architecture
2022-03-22 11:52 [gprofng] Adding a new CPU architecture Thomas Gruber
@ 2022-03-22 16:05 ` Vladimir Mezentsev
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Mezentsev @ 2022-03-22 16:05 UTC (permalink / raw)
To: Thomas Gruber, binutils
Hi Thomas,
On 3/22/22 04:52, Thomas Gruber wrote:
> Hi,
>
> I tried to add Fujitsu A64FX hardware performance event support to
> gprofng
Super.
Welcome to the gprofng team.
> but didn't find a contributing guide. The comments in the code and the
> code structure itself didn't help much in my understanding.
>
> Just adding the event list is probably not enough since the A64FX is
> not detected properly yet by gprofng, so extending the CPU detection
> is also required.
>
> Are there some hints how to add a new architecture to gprofng?
No.
Historically, HWC profiling has been based on different APIs ( libcpc,
libperfctr, ... ).
Currently only the perf_even API is used ( See
https://man7.org/linux/man-pages/man2/perf_event_open.2.html )
To add HWC support for a new architecture, you need to complete the
following steps:
- Add a new cpu type. See gprofng/common/cpuid.c and
gprofng/common/hwc_cpus.h
- Add tables in gprofng/common/hwctable.c. See lines around 2374 for
an example.
- If necessary, change init_perf_event() in gprofng/common/hwcdrv.c
line ~678.
Thank you,
-Vladimir
>
> Best,
> Thomas
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-22 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 11:52 [gprofng] Adding a new CPU architecture Thomas Gruber
2022-03-22 16:05 ` Vladimir Mezentsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).