X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=hiprofile.py;h=212fbf13e76a32e8dd26fdbb650fd387df5edb12;hb=45d77ca5ecee3a58aa0d889ad1d3b72368966e7f;hp=f6456a4423297eada40b27a5431019dba6d11618;hpb=18fd0ce3407d35a7d45854faa5101b11ed794c5b;p=hiprofile diff --git a/hiprofile.py b/hiprofile.py index f6456a4..212fbf1 100644 --- a/hiprofile.py +++ b/hiprofile.py @@ -174,7 +174,7 @@ class Binary(object): lambda r: r.count, thresholds['symbol']) self.reference_dict = dict([ (r.name, r) for r in self.references ]) - def annotate(self, report, conn): + def annotate(self, report, conn, options): fn_re = re.compile('^[0-9a-f]+\s+<[^>]+>: /\* (\S+) total:') symbols = [ s for s in self.references if s.name != '(no symbols)' ] @@ -182,7 +182,7 @@ class Binary(object): if not symbols: return - command = ['opannotate', '--source', '--assembly', + command = [options.opannotate, '--source', '--assembly', '--include-file=' + self.name, '-i', ','.join([ s.name for s in symbols ])] @@ -252,9 +252,9 @@ class Report(object): for binary in self.binaries: binary.threshold(thresholds) - def annotate(self, conn): + def annotate(self, conn, options): for binary in self.binaries: - binary.annotate(self, conn) + binary.annotate(self, conn, options) @staticmethod def parse(doc, hostname): @@ -288,8 +288,8 @@ class Report(object): return report @staticmethod - def extract(connection): - fd = connection.execute(['opreport', '--xml']) + def extract(connection, options): + fd = connection.execute([options.opreport, '--xml']) doc = parseXML(fd) if connection.host: