Index: tools/callstats.py |
diff --git a/tools/callstats.py b/tools/callstats.py |
index 30bd0166b13fbe727f1589d77ba2a7ce396bfc4f..c82777da20aa494558dbe4cc4c146fad36f62f96 100755 |
--- a/tools/callstats.py |
+++ b/tools/callstats.py |
@@ -346,6 +346,7 @@ def read_stats(path, domain, args): |
('Group-IC', re.compile(".*IC_.*")), |
('Group-Optimize', |
re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")), |
+ ('Group-CompileBackground', re.compile("(.*CompileBackground.*)")), |
Camillo Bruni
2016/12/16 09:25:05
Could you add the same regexp entry in callstats.h
rmcilroy
2016/12/16 23:48:05
Done.
|
('Group-Compile', re.compile("(^Compile.*)|(.*_Compile.*)")), |
('Group-ParseBackground', re.compile(".*ParseBackground.*")), |
('Group-Parse', re.compile(".*Parse.*")), |
@@ -399,6 +400,13 @@ def read_stats(path, domain, args): |
group_data['time'] += entries[group_name]['time'] |
group_data['count'] += entries[group_name]['count'] |
entries['Group-Parse-Total'] = group_data |
+ # Calculate the Compile-Total group |
+ group_data = { 'time': 0, 'count': 0 } |
+ for group_name, regexp in groups: |
+ if not group_name.startswith('Group-Compile'): continue |
+ group_data['time'] += entries[group_name]['time'] |
+ group_data['count'] += entries[group_name]['count'] |
+ entries['Group-Compile-Total'] = group_data |
# Append the sums as single entries to domain. |
for key in entries: |
if key not in domain: domain[key] = { 'time_list': [], 'count_list': [] } |