blob: 0f6cbdad5573a03795b90f75fcda690439632ef8 [file] [log] [blame]
Teng Qinef9d83f2019-02-28 15:29:55 -08001/*
2 * Copyright (c) Facebook, Inc.
3 * Licensed under the Apache License, Version 2.0 (the "License")
4 */
5
6#include "PyPerfType.h"
7
8namespace ebpf {
9namespace pyperf {
10
11extern 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