Hello,

I'm trying to measure a NorthBridge event on a AMD Interlagos (Fam
15h) and I'm having some trouble trying to adapt one of the
perf_examples provided by libpfm-4.5.0.

I could successfully run the syst example on perf_examples for the
event "amd64_fam15h_nb::CPU_TO_DRAM_REQUESTS_TO_TARGET_NODE:LOCAL_TO_NODE_0
".

That program measures the counter for all processes, but I'm
interested in measuring it only for my program. Since the other
examples were not working (out of the box) with that event, I decided
to modify the perf_event_open() call, which was

perf_event_open(&fds[i].hw, -1, 0, -1, 0);

Changing the second parameter to 0 should make it measure only the
current process/thread. Doing this, however, fails with "invalid
argument".

Below is the output of the fds[i].hw.
(gdb) p fds[i].hw
$4 = {type = 6, size = 96, config = 4300407264, {sample_period = 0,
sample_freq = 0}, sample_type = 0, read_format = 3, disabled = 1,
inherit = 0,
  pinned = 0, exclusive = 0, exclude_user = 0, exclude_kernel = 0,
exclude_hv = 0, exclude_idle = 0, mmap = 0, comm = 0, freq = 0,
inherit_stat = 0,
  enable_on_exec = 0, task = 0, watermark = 0, precise_ip = 0,
mmap_data = 0, sample_id_all = 0, exclude_host = 0, exclude_guest = 0,
  exclude_callchain_kernel = 0, exclude_callchain_user = 0,
__reserved_1 = 0, {wakeup_events = 0, wakeup_watermark = 0}, bp_type =
0, {bp_addr = 0,
    config1 = 0}, {bp_len = 0, config2 = 0}, branch_sample_type = 0,
sample_regs_user = 0, sample_stack_user = 0, __reserved_2 = 0}

Using a different event, such as "instructions" worked with the
altered perf_event_open call. The only differences between
"instructions" and my event are in the type field (0), exclude_hv (1)
and exclude_guest (1), as well as config (1), of course.

Any idea what might be the issue or what I could do to measure it?

Thank you,
Martin

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to