Lines Matching refs:process

89 def parse_samples(process, args, sample_filter_fn):  argument
112 process.cmd = lib.GetRecordCmd()
116 process.props['ro.product.manufacturer'] = manufacturer
117 process.props['ro.product.model'] = model
118 process.props['ro.product.name'] = name
120 process.props['trace_offcpu'] = True
125 process.props['trace_offcpu'] = False
136 process.add_sample(sample, symbol, callchain)
138 if process.pid == 0:
139 main_threads = [thread for thread in process.threads.values() if thread.tid == thread.pid]
141 process.name = main_threads[0].name
142 process.pid = main_threads[0].pid
144 for thread in process.threads.values():
148 log_info("Parsed %s callchains." % process.num_samples)
161 def output_report(process, args): argument
179 process_entry = ("Process : %s (%d)<br/>" % (process.name, process.pid)) if process.pid else ""
180 thread_entry = '' if args.one_flamegraph else ('Threads: %d<br/>' % len(process.threads))
181 if process.props['trace_offcpu']:
182 event_entry = 'Total time: %s<br/>' % get_proper_scaled_time_string(process.num_events)
184 event_entry = 'Event count: %s<br/>' % ("{:,}".format(process.num_events))
200 process.num_samples,
203 if 'ro.product.model' in process.props:
206 (process.props["ro.product.model"],
207 process.props["ro.product.name"],
208 process.props["ro.product.manufacturer"]))
209 if process.cmd:
210 f.write("Capture : %s<br/><br/>" % process.cmd)
219 for thread in sorted(process.threads.values(), key=lambda x: x.num_events, reverse=True):
224 render_svg(process, thread.flamegraph, f, args.color)
233 def generate_threads_offsets(process): argument
234 for thread in process.threads.values():
238 def collect_machine_info(process): argument
240 process.props = {}
241 process.props['ro.product.model'] = adb.get_property('ro.product.model')
242 process.props['ro.product.name'] = adb.get_property('ro.product.name')
243 process.props['ro.product.manufacturer'] = adb.get_property('ro.product.manufacturer')
313 process = Process("", 0)
317 process.pid = args.pid
320 process.pid = -1
324 process.name = 'system_wide'
326 process.name = args.app or args.native_program or ('Process %d' % args.pid)
327 log_info("Starting data collection stage for '%s'." % process.name)
330 if process.pid == 0:
331 result, output = AdbHelper().run_and_return_output(['shell', 'pidof', process.name])
334 process.pid = int(output)
336 process.pid = 0
337 collect_machine_info(process)
344 sample.pid = sample.tid = process.pid
352 parse_samples(process, args, sample_filter_fn)
353 generate_threads_offsets(process)
354 report_path = output_report(process, args)