- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I wanna use perf_event_open function to get the iMC Performance Monitoring Events, but I don't know how to set up the parameters. I tried to set up it but the result I get is inconsistent with the results obtained by perf commands. The function is
int perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags);
For this event
- CAS_COUNT
• Title: DRAM RD_CAS and WR_CAS Commands.
• Category: PRE Events
• Event Code: 0x04
• Max. Inc/Cyc:. 1, Register Restrictions: 0-3
• Definition: DRAM RD_CAS and WR_CAS Commands
I wanna evaluate the subevents RD and WR which umask is 0x03 and 0x0c. But what I know is this is socket-level event monitoring. However, in perf_event_open's parameters, there is no way to set up cpumask for socket-level monitoring (just per-cpu monitoring maybe). Have someone come across the same problems with me? I didn't find useful parameters in perf_event_attr to set up socket-level monitoring.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lingyan,
To understand how perf tool programs iMC events collection over perf_event_open system call you may run this command:
perf stat -vv -a -e mem_loads,mem_stores
It will give you detailed content of perf_event_attr structutres and how they are mapped to CPUs.
Regards,
Alexey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AMAZING!!! I just found I was one step away from this! Very useful!
But here is another thing. since the read_format is 0x03, so how do I read it? The result I read using
ioctl(fds
ret = read(fds
is odd. ret is 24 meaning it has three uint64_t numbers. The first one is 0, the two left are equal to each other. Could you please tell me how to read the counters?
Alexey Budankov (Intel) wrote:
Hi Lingyan,
To understand how perf tool programs iMC events collection over perf_event_open system call you may run this command:
perf stat -vv -a -e mem_loads,mem_stores
It will give you detailed content of perf_event_attr structutres and how they are mapped to CPUs.
Regards,
Alexey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have solved this! Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page