Skip to content

Commit

Permalink
Fix MSR module and offcore events
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Jan 21, 2015
1 parent 2d3192f commit 4960720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions msr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Author: Andi Kleen
import glob
import struct
import os

def writemsr(msr, val):
n = glob.glob('/dev/cpu/*/msr')
Expand Down
3 changes: 2 additions & 1 deletion ocperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,12 @@ def add_offcore(self, name):
def create_event(req_name, req_val, req_desc, res_name, res_val, res_desc):
oe = copy.deepcopy(offcore_response)
oe.name = ("OFFCORE_RESPONSE.%s.%s" % (req_name, res_name)).lower()
oe.msr = 0x1a6
oe.msrval = int(req_val, 16) | int(res_val, 16)
oe.desc = req_desc + " " + res_desc
if version.offcore:
oe.newextra = ",offcore_rsp=0x%x" % (oe.msrval, )
else:
oe.msr = 0x1a6
self.add_event(oe)

for a, b in itertools.product(requests, responses):
Expand Down

0 comments on commit 4960720

Please sign in to comment.