MCPcopy Index your code
hub / github.com/python/cpython / get_syscalls

Function get_syscalls

Lib/test/support/strace_helper.py:167–175  ·  view source on GitHub ↗

Get the syscalls which a given chunk of python code generates

(code, strace_flags, prelude="", cleanup="",
                 ignore_memory=True)

Source from the content-addressed store, hash-verified

165
166
167def 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.

Callers

nothing calls this directly

Calls 2

get_eventsFunction · 0.85
filter_memoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…