Get the syscalls which a given chunk of python code generates
(code, strace_flags, prelude="", cleanup="",
ignore_memory=True)
| 165 | |
| 166 | |
| 167 | def get_syscalls(code, strace_flags, prelude="", cleanup="", |
| 168 | ignore_memory=True): |
| 169 | """Get the syscalls which a given chunk of python code generates""" |
| 170 | events = get_events(code, strace_flags, prelude=prelude, cleanup=cleanup) |
| 171 | |
| 172 | if ignore_memory: |
| 173 | events = filter_memory(events) |
| 174 | |
| 175 | return [ev.syscall for ev in events] |
| 176 | |
| 177 | |
| 178 | # Moderately expensive (spawns a subprocess), so share results when possible. |
nothing calls this directly
no test coverage detected
searching dependent graphs…