Changeset View
Changeset View
Standalone View
Standalone View
lnt/testing/profile/perf.py
Show All 16 Lines | def __init__(self): | ||||
pass | pass | ||||
@staticmethod | @staticmethod | ||||
def checkFile(fn): | def checkFile(fn): | ||||
with open(fn, 'rb') as f: | with open(fn, 'rb') as f: | ||||
return f.read(8) == b'PERFILE2' | return f.read(8) == b'PERFILE2' | ||||
@staticmethod | @staticmethod | ||||
def deserialize(f, nm='nm', objdump='objdump', propagateExceptions=False): | def deserialize(f, nm='nm', objdump='objdump', propagateExceptions=False, | ||||
binaryCacheRoot=''): | |||||
f = f.name | f = f.name | ||||
if os.path.getsize(f) == 0: | if os.path.getsize(f) == 0: | ||||
# Empty file - exit early. | # Empty file - exit early. | ||||
return None | return None | ||||
try: | try: | ||||
data = cPerf.importPerf(f, nm, objdump) | data = cPerf.importPerf(f, nm, objdump) | ||||
Show All 17 Lines |