Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.0:Staging:E
libpfm
libpfm-python3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libpfm-python3.patch of Package libpfm
Index: libpfm-4.9.0/python/src/pmu.py =================================================================== --- libpfm-4.9.0.orig/python/src/pmu.py +++ libpfm-4.9.0/python/src/pmu.py @@ -26,7 +26,7 @@ from perfmon import * def public_members(self): s = "{ " - for k, v in self.__dict__.iteritems(): + for k, v in self.__dict__.items(): if not k[0] == '_': s += "%s : %s, " % (k, v) s += " }" @@ -94,8 +94,8 @@ if __name__ == '__main__': for pmu in s.pmus: info = pmu.info if info.flags.is_present: - print info.name, info.size, info.nevents + print(info.name, info.size, info.nevents) for e in pmu.events(): - print e.info.name, e.info.code + print(e.info.name, e.info.code) for a in e.attrs(): - print '\t\t', a.name, a.code + print('\t\t', a.name, a.code) Index: libpfm-4.9.0/python/sys.py =================================================================== --- libpfm-4.9.0.orig/python/sys.py +++ libpfm-4.9.0/python/sys.py @@ -48,7 +48,7 @@ if __name__ == '__main__': if options.events: events = options.events.split(",") else: - raise "You need to specify events to monitor" + raise Exception("You need to specify events to monitor") s = perfmon.SystemWideSession(cpus, events) @@ -60,4 +60,4 @@ if __name__ == '__main__': for c in cpus: for i in range(0, len(events)): count = struct.unpack("L", s.read(c, i))[0] - print """CPU%d: %s\t%lu""" % (c, events[i], count) + print("""CPU%d: %s\t%lu""" % (c, events[i], count)) Index: libpfm-4.9.0/python/self.py =================================================================== --- libpfm-4.9.0.orig/python/self.py +++ libpfm-4.9.0/python/self.py @@ -40,7 +40,7 @@ if __name__ == '__main__': if options.events: events = options.events.split(",") else: - raise "You need to specify events to monitor" + raise Exception("You need to specify events to monitor") s = perfmon.PerThreadSession(int(os.getpid()), events) s.start() @@ -55,4 +55,4 @@ if __name__ == '__main__': # read the counts for i in range(0, len(events)): count = struct.unpack("L", s.read(i))[0] - print """%s\t%lu""" % (events[i], count) + print("""%s\t%lu""" % (events[i], count))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor