(args)
| 129 | |
| 130 | |
| 131 | def _build_child_profiler_args(args): |
| 132 | child_args = [] |
| 133 | |
| 134 | # Sampling options |
| 135 | hz = MICROSECONDS_PER_SECOND // args.sample_interval_usec |
| 136 | child_args.extend(["-r", str(hz)]) |
| 137 | if args.duration is not None: |
| 138 | child_args.extend(["-d", str(args.duration)]) |
| 139 | if args.all_threads: |
| 140 | child_args.append("-a") |
| 141 | if args.realtime_stats: |
| 142 | child_args.append("--realtime-stats") |
| 143 | if args.native: |
| 144 | child_args.append("--native") |
| 145 | if not args.gc: |
| 146 | child_args.append("--no-gc") |
| 147 | if args.opcodes: |
| 148 | child_args.append("--opcodes") |
| 149 | if args.async_aware: |
| 150 | child_args.append("--async-aware") |
| 151 | async_mode = getattr(args, 'async_mode', 'running') |
| 152 | if async_mode != "running": |
| 153 | child_args.extend(["--async-mode", async_mode]) |
| 154 | |
| 155 | # Mode options |
| 156 | mode = getattr(args, 'mode', 'wall') |
| 157 | if mode != "wall": |
| 158 | child_args.extend(["--mode", mode]) |
| 159 | |
| 160 | # Format options (skip pstats as it's the default) |
| 161 | if args.format != "pstats": |
| 162 | child_args.append(f"--{args.format}") |
| 163 | |
| 164 | return child_args |
| 165 | |
| 166 | |
| 167 | def _build_output_pattern(args): |
searching dependent graphs…