Convert mode string to mode constant.
(mode_string)
| 189 | |
| 190 | |
| 191 | def _parse_mode(mode_string): |
| 192 | """Convert mode string to mode constant.""" |
| 193 | mode_map = { |
| 194 | "wall": PROFILING_MODE_WALL, |
| 195 | "cpu": PROFILING_MODE_CPU, |
| 196 | "gil": PROFILING_MODE_GIL, |
| 197 | "exception": PROFILING_MODE_EXCEPTION, |
| 198 | } |
| 199 | return mode_map[mode_string] |
| 200 | |
| 201 | |
| 202 | def _check_process_died(process): |
no outgoing calls
searching dependent graphs…