Record call_time on tree nodes and re-name the misnamed "count" parameter.
Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all
Unified · Split
| @@ -794,15 +794,16 @@ class CallGraphModel(CallGraphModelBase): · 793 unmodified lines | |||
| 794 | 794 | ||
| 795 | class CallTreeLevelTwoPlusItemBase(CallGraphLevelItemBase): | 795 | class CallTreeLevelTwoPlusItemBase(CallGraphLevelItemBase): |
| 796 | 796 | ||
| 797 | def __init__(self, glb, params, row, comm_id, thread_id, calls_id, time, insn_cnt, cyc_cnt, branch_count, parent_item): | 797 | def __init__(self, glb, params, row, comm_id, thread_id, calls_id, call_time, time, insn_cnt, cyc_cnt, branch_count, parent_item): |
| 798 | super(CallTreeLevelTwoPlusItemBase, self).__init__(glb, params, row, parent_item) | 798 | super(CallTreeLevelTwoPlusItemBase, self).__init__(glb, params, row, parent_item) |
| 799 | self.comm_id = comm_id | 799 | self.comm_id = comm_id |
| 800 | self.thread_id = thread_id | 800 | self.thread_id = thread_id |
| 801 | self.calls_id = calls_id | 801 | self.calls_id = calls_id |
| 802 | self.call_time = call_time | ||
| 803 | self.time = time | ||
| 802 | self.insn_cnt = insn_cnt | 804 | self.insn_cnt = insn_cnt |
| 803 | self.cyc_cnt = cyc_cnt | 805 | self.cyc_cnt = cyc_cnt |
| 804 | self.branch_count = branch_count | 806 | self.branch_count = branch_count |
| 805 | self.time = time | ||
| 806 | 807 | ||
| 807 | def Select(self): | 808 | def Select(self): |
| 808 | self.query_done = True | 809 | self.query_done = True |
| @@ -839,17 +840,17 @@ class CallTreeLevelTwoPlusItemBase(CallGraphLevelItemBase): · 30 unmodified lines | |||
| 839 | 840 | ||
| 840 | class CallTreeLevelThreeItem(CallTreeLevelTwoPlusItemBase): | 841 | class CallTreeLevelThreeItem(CallTreeLevelTwoPlusItemBase): |
| 841 | 842 | ||
| 842 | def __init__(self, glb, params, row, comm_id, thread_id, calls_id, name, dso, count, time, insn_cnt, cyc_cnt, branch_count, parent_item): | 843 | def __init__(self, glb, params, row, comm_id, thread_id, calls_id, name, dso, call_time, time, insn_cnt, cyc_cnt, branch_count, parent_item): |
| 843 | super(CallTreeLevelThreeItem, self).__init__(glb, params, row, comm_id, thread_id, calls_id, time, insn_cnt, cyc_cnt, branch_count, parent_item) | 844 | super(CallTreeLevelThreeItem, self).__init__(glb, params, row, comm_id, thread_id, calls_id, call_time, time, insn_cnt, cyc_cnt, branch_count, parent_item) |
| 844 | dso = dsoname(dso) | 845 | dso = dsoname(dso) |
| 845 | if self.params.have_ipc: | 846 | if self.params.have_ipc: |
| 846 | insn_pcnt = PercentToOneDP(insn_cnt, parent_item.insn_cnt) | 847 | insn_pcnt = PercentToOneDP(insn_cnt, parent_item.insn_cnt) |
| 847 | cyc_pcnt = PercentToOneDP(cyc_cnt, parent_item.cyc_cnt) | 848 | cyc_pcnt = PercentToOneDP(cyc_cnt, parent_item.cyc_cnt) |
| 848 | br_pcnt = PercentToOneDP(branch_count, parent_item.branch_count) | 849 | br_pcnt = PercentToOneDP(branch_count, parent_item.branch_count) |
| 849 | ipc = CalcIPC(cyc_cnt, insn_cnt) | 850 | ipc = CalcIPC(cyc_cnt, insn_cnt) |
| 850 | self.data = [ name, dso, str(count), str(time), PercentToOneDP(time, parent_item.time), str(insn_cnt), insn_pcnt, str(cyc_cnt), cyc_pcnt, ipc, str(branch_count), br_pcnt ] | 851 | self.data = [ name, dso, str(call_time), str(time), PercentToOneDP(time, parent_item.time), str(insn_cnt), insn_pcnt, str(cyc_cnt), cyc_pcnt, ipc, str(branch_count), br_pcnt ] |
| 851 | else: | 852 | else: |
| 852 | self.data = [ name, dso, str(count), str(time), PercentToOneDP(time, parent_item.time), str(branch_count), PercentToOneDP(branch_count, parent_item.branch_count) ] | 853 | self.data = [ name, dso, str(call_time), str(time), PercentToOneDP(time, parent_item.time), str(branch_count), PercentToOneDP(branch_count, parent_item.branch_count) ] |
| 853 | self.dbid = calls_id | 854 | self.dbid = calls_id |
| 854 | 855 | ||
| 855 | # Call tree data model level two item | 856 | # Call tree data model level two item |
| @@ -857,7 +858,7 @@ class CallTreeLevelThreeItem(CallTreeLevelTwoPlusItemBase): · 1 unmodified line | |||
| 857 | class CallTreeLevelTwoItem(CallTreeLevelTwoPlusItemBase): | 858 | class CallTreeLevelTwoItem(CallTreeLevelTwoPlusItemBase): |
| 858 | 859 | ||
| 859 | def __init__(self, glb, params, row, comm_id, thread_id, pid, tid, parent_item): | 860 | def __init__(self, glb, params, row, comm_id, thread_id, pid, tid, parent_item): |
| 860 | super(CallTreeLevelTwoItem, self).__init__(glb, params, row, comm_id, thread_id, 0, 0, 0, 0, 0, parent_item) | 861 | super(CallTreeLevelTwoItem, self).__init__(glb, params, row, comm_id, thread_id, 0, 0, 0, 0, 0, 0, parent_item) |
| 861 | if self.params.have_ipc: | 862 | if self.params.have_ipc: |
| 862 | self.data = [str(pid) + ":" + str(tid), "", "", "", "", "", "", "", "", "", "", ""] | 863 | self.data = [str(pid) + ":" + str(tid), "", "", "", "", "", "", "", "", "", "", ""] |
| 863 | else: | 864 | else: |