forked from google/trace-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhy_imported
More file actions
executable file
·28 lines (21 loc) · 834 Bytes
/
why_imported
File metadata and controls
executable file
·28 lines (21 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
import sys
import optparse
from trace_viewer import trace_viewer_project
def Main(args):
project = trace_viewer_project.TraceViewerProject()
parser = optparse.OptionParser(
usage="%prog <options> moduleNames",
epilog="""Produces a dot file that explains why given module names were included in a trace_viewer config.""")
parser.add_option('--config',
type='choice', choices=project.GetConfigNames())
options, args = parser.parse_args(args)
if options.config:
names = ['trace_viewer',
project.GetModuleNameForConfigName(options.config)]
load_sequence = project.CalcLoadSequenceForModuleNames(names)
else:
load_sequence = None
print project.GetDominatorGraphForModulesNamed(args, load_sequence)
if __name__ == '__main__':
sys.exit(Main(sys.argv[1:]))