Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/profile_chrome/third_party/perf_to_tracing.py

Issue 296623002: Integrate perfvis profiling mode, and temporary report generator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/profiler/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Script for converting perf script events into tracing JSON. 1 # Script for converting perf script events into tracing JSON.
2 # 2 #
3 # Generated by perf script -g python 3 # Generated by perf script -g python
4 # Licensed under the terms of the GNU GPL License version 2 4 # Licensed under the terms of the GNU GPL License version 2
5 5
6 import json 6 import json
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from collections import deque 10 from collections import deque
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 'libchromeview.so': 'Chrome', 44 'libchromeview.so': 'Chrome',
45 '[unknown]': '<unknown>', 45 '[unknown]': '<unknown>',
46 '[UNKNOWN]': '<unknown>', 46 '[UNKNOWN]': '<unknown>',
47 } 47 }
48 48
49 49
50 def FilterSymbolModule(module): 50 def FilterSymbolModule(module):
51 m = dso_to_comp.get(module, None) 51 m = dso_to_comp.get(module, None)
52 if m: 52 if m:
53 return m 53 return m
54 if module.find('libchrome.') == 0: 54 if module.find('libchrome') == 0 or module.find('libcontent_shell') == 0:
55 return 'Chrome' 55 return 'Chrome'
56 if module.find('dalvik') >= 0 or module.find('@') >= 0: 56 if module.find('dalvik') >= 0 or module.find('@') >= 0:
57 return 'Java' 57 return 'Java'
58 return module 58 return module
59 59
60 60
61 def FilterSymbolName(module, orign_module, name): 61 def FilterSymbolName(module, orign_module, name):
62 if module == 'Java': 62 if module == 'Java':
63 return name 63 return name
64 elif module == 'GPU Driver': 64 elif module == 'GPU Driver':
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 FixCallTree(c, node) 239 FixCallTree(c, node)
240 240
241 FixCallTree(root_chain, None) 241 FixCallTree(root_chain, None)
242 242
243 trace_dict = {} 243 trace_dict = {}
244 trace_dict['samples'] = [s.ToDict() for s in samples] 244 trace_dict['samples'] = [s.ToDict() for s in samples]
245 trace_dict['stackFrames'] = root_chain.ToDict({}) 245 trace_dict['stackFrames'] = root_chain.ToDict({})
246 trace_dict['traceEvents'] = [] 246 trace_dict['traceEvents'] = []
247 247
248 json.dump(trace_dict, sys.stdout, indent=1) 248 json.dump(trace_dict, sys.stdout, indent=1)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/profiler/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698