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.