Lines Matching refs:args

49 def collect_data(args):  argument
52 if args.app:
53 app_profiler_args += ["-p", args.app]
54 elif args.native_program:
55 app_profiler_args += ["-np", args.native_program]
56 elif args.pid != -1:
57 app_profiler_args += ['--pid', str(args.pid)]
58 elif args.system_wide:
62 if args.compile_java_code:
64 if args.disable_adb_root:
67 if args.dwarf_unwinding:
71 if args.events:
72 tokens = args.events.split()
81 record_arg_str += "-f %d " % args.sample_frequency
82 log_info("Using frequency sampling (-f %d)." % args.sample_frequency)
83 record_arg_str += "--duration %d " % args.capture_duration
89 def parse_samples(process, args, sample_filter_fn): argument
97 record_file = args.record_file
98 symfs_dir = args.symfs
99 kallsyms_file = args.kallsyms
110 if args.show_art_frames:
121 if args.one_flamegraph:
145 min_event_count = thread.num_events * args.min_callchain_percentage * 0.01
146 thread.flamegraph.trim_callchain(min_event_count, args.max_callchain_depth)
161 def output_report(process, args): argument
167 f = open(args.report_path, 'w')
169 if not args.embedded_flamegraph:
172 "display: none;" if args.embedded_flamegraph else ""))
180 thread_entry = '' if args.one_flamegraph else ('Threads: %d<br/>' % len(process.threads))
186 duration_entry = ("Duration: %s seconds<br/>" % args.capture_duration
187 ) if args.capture_duration else ""
196 %s""" % ((': ' + args.title) if args.title else '',
215 if not args.embedded_flamegraph:
220 thread_name = 'One flamegraph' if args.one_flamegraph else ('Thread %d (%s)' %
224 render_svg(process, thread.flamegraph, f, args.color)
227 if not args.embedded_flamegraph:
312 args = parser.parse_args()
315 if not args.skip_collection:
316 if args.pid != -1:
317 process.pid = args.pid
318 args.native_program = ''
319 if args.system_wide:
321 args.native_program = ''
323 if args.system_wide:
326 process.name = args.app or args.native_program or ('Process %d' % args.pid)
328 if not collect_data(args):
339 args.capture_duration = 0
342 if args.one_flamegraph:
347 if not args.title:
348 args.title = ''
349 args.title += '(One Flamegraph)'
352 parse_samples(process, args, sample_filter_fn)
354 report_path = output_report(process, args)
355 if not args.no_browser: