Teng Qin | ef9d83f | 2019-02-28 15:29:55 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) Facebook, Inc. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License") |
| 4 | */ |
| 5 | |
| 6 | #include "PyPerfType.h" |
| 7 | |
| 8 | namespace ebpf { |
| 9 | namespace pyperf { |
| 10 | |
| 11 | extern const OffsetConfig kPy36OffsetConfig = { |
| 12 | .PyObject_type = 8, // offsetof(PyObject, ob_type) |
| 13 | .PyTypeObject_name = 24, // offsetof(PyTypeObject, tp_name) |
| 14 | .PyThreadState_frame = 24, // offsetof(PyThreadState, frame) |
| 15 | .PyThreadState_thread = 152, // offsetof(PyThreadState, thread_id) |
| 16 | .PyFrameObject_back = 24, // offsetof(PyFrameObject, f_back) |
| 17 | .PyFrameObject_code = 32, // offsetof(PyFrameObject, f_code) |
| 18 | .PyFrameObject_lineno = 124, // offsetof(PyFrameObject, f_lineno) |
| 19 | .PyFrameObject_localsplus = 376, // offsetof(PyFrameObject, f_localsplus) |
| 20 | .PyCodeObject_filename = 96, // offsetof(PyCodeObject, co_filename) |
| 21 | .PyCodeObject_name = 104, // offsetof(PyCodeObject, co_name) |
| 22 | .PyCodeObject_varnames = 64, // offsetof(PyCodeObject, co_varnames) |
| 23 | .PyTupleObject_item = 24, // offsetof(PyTupleObject, ob_item) |
| 24 | .String_data = 48, // sizeof(PyASCIIObject) |
| 25 | .String_size = 16, // offsetof(PyVarObject, ob_size) |
| 26 | }; |
| 27 | |
| 28 | } |
| 29 | } // namespace ebpf |