Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Reprogramming Uncore Counters on the fly

Nash_R_
Beginner
467 Views

I'm working on a project to log all DRAM metrics available for measuring in the Intel Memory Controller (full list of these can be seen in the Intel Xeon Processor E5-2600 Product Family Uncore Performance Monitoring Guide, page 63, Table 2-64) on a Jaketown system. Ideally, this would work by programming the counters with a certain event code and umask, waiting an interval of a second or so, getting the delta between values, then reprogramming the uncore counters and starting all over again. I've been able to modify the method JKT_Uncore_Pci::program so that I can pass in the event code and umask as variables; however, the data I've been getting out suggests that I'm not actually reconfiguring the counters to count their intended metrics when calling the method (i.e. all of the data is similar in value). The values I've been getting for ECC_CORRECTABLE_ERRORS in particular seems fishy; it seems unlikely that I'd be getting in the neighborhood of ~2000 ECC events every second, especially for a server system otherwise at rest. 

Is it possible to reprogram these registers on the fly? Do they need to be frozen to be reprogrammed? I did not remove the code to freeze the registers from the method JKT_Uncore_Pci; however, there's always the possibility that they need to be locked by some other method. 

0 Kudos
5 Replies
Bernard
Valued Contributor I
467 Views

How do you access Uncore PMU?I mean do you use kernel mode driver or user mode API?

I'm  writing simple driver which will access Uncore PMU with the help of inline assembly , my code only tries to read CBo Cn_MSR_PMON_CTRn registers.

What do you mean by reprogramming on the fly?Without the freezing of Cn_MSR_PMON_CTLn bitfield?

0 Kudos
Roman_D_Intel
Employee
467 Views

Nash,

to reprogram iMC PMU you need to setup a new monitoring session following the steps described in section 2.1.1 of the manual you mentioned. This is implemented in JKT_Uncore_Pci::program PCM function.

Thanks,

Roman

0 Kudos
Nash_R_
Beginner
467 Views

Roman Dementiev (Intel) wrote:

Nash,

to reprogram iMC PMU you need to setup a new monitoring session following the steps described in section 2.1.1 of the manual you mentioned. This is implemented in JKT_Uncore_Pci::program PCM function.

Thanks,

Roman

Roman,

Is it not possible to call JKT_uncore_pci::program in a fashion like this: 

[cpp]

PCM *m = PCM::getInstance();

JKT_Uncore_Pci *uncore = new JKT_Uncore_Pci((uint32)0, m);

uncore->program(uint32 event, uint32 umask);

[/cpp]

I did a little tinkering under the hood so that it's only programming a single register (MC_CH_PCI_PMON_CTL0), and so the method JKT_Uncore_Pci::program method accepts variables for the event code and umask code. For some reason, however, it doesn't seem to be changing the output of the registers- the output seems to be in the same ballpark, regardless of what I pass into the program method. I'm sampling and taking a delta once per second, if that's any help.

Thanks for your help,

NR

0 Kudos
Nash_R_
Beginner
467 Views

Please disregard my last post; I figured out where my error was. Turns out you need to be programming the correct socket to get any appreciable sort of change in the counters when calling the program method (which I wasn't doing). Thanks for your assistance!

0 Kudos
Roman_D_Intel
Employee
467 Views

Nash, you are welcome.

0 Kudos
Reply