summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-10-21 16:32:48 -0400
committerNathan Binkert <binkertn@umich.edu>2005-10-21 16:32:48 -0400
commit12822443a595eb1260f63ba756b110d5f91f0da6 (patch)
tree8bcc26ab8bc0c3c905e35f692358ff85ff8f1a75
parent7ef8b40b3bc07acfeec7e7ccdbe648e67a309cab (diff)
downloadgem5-12822443a595eb1260f63ba756b110d5f91f0da6.tar.xz
Minor updates to the profile code.
util/stats/profile.py: Pass around the number of symbols limit deal with categorization a bit better. --HG-- extra : convert_revision : 908410e296efd4514f2dfc0eb9e6e42834585560
-rw-r--r--util/stats/profile.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/util/stats/profile.py b/util/stats/profile.py
index cf946452b..57b854a30 100644
--- a/util/stats/profile.py
+++ b/util/stats/profile.py
@@ -316,7 +316,7 @@ class Profile(object):
symbols.tree.dot(dot, threshold=threshold)
dot.write(symbols.filename[:-3] + 'dot')
- def write_txt(self, jobfile=None, jobs=None):
+ def write_txt(self, jobfile=None, jobs=None, limit=None):
if jobs is None:
jobs = [ job for job in jobfile.jobs() ]
@@ -327,7 +327,7 @@ class Profile(object):
continue
output = file(symbols.filename[:-3] + 'txt', 'w')
- symbols.display(output)
+ symbols.display(output, limit)
def display(self, jobfile=None, jobs=None, limit=None):
if jobs is None:
@@ -453,6 +453,8 @@ if __name__ == '__main__':
else:
profile = PCProfile()
+ if not categorize:
+ profile.categorize = None
profile.inputdir(jobfile.rootdir)
if graph:
@@ -470,11 +472,6 @@ if __name__ == '__main__':
profile.cpu = cpu
profile.write_dot(jobfile=jobfile, threshold=threshold)
- if not categorize:
- for cpu in cpus:
- profile.cpu = cpu
- profile.categorize = None
-
if textout:
for cpu in cpus:
profile.cpu = cpu
@@ -482,5 +479,7 @@ if __name__ == '__main__':
if not graph and not textout and not dodot:
for cpu in cpus:
+ if not categorize:
+ profile.categorize = None
profile.cpu = cpu
profile.display(jobfile=jobfile, limit=numsyms)