File: Py36Offsets.cc

package info (click to toggle)
bpfcc 0.18.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,368 kB
  • sloc: ansic: 132,727; python: 36,226; cpp: 26,973; sh: 710; yacc: 525; makefile: 141; lex: 94
file content (29 lines) | stat: -rw-r--r-- 1,269 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) Facebook, Inc.
 * Licensed under the Apache License, Version 2.0 (the "License")
 */

#include "PyPerfType.h"

namespace ebpf {
namespace pyperf {

extern const OffsetConfig kPy36OffsetConfig = {
    .PyObject_type = 8,               // offsetof(PyObject, ob_type)
    .PyTypeObject_name = 24,          // offsetof(PyTypeObject, tp_name)
    .PyThreadState_frame = 24,        // offsetof(PyThreadState, frame)
    .PyThreadState_thread = 152,      // offsetof(PyThreadState, thread_id)
    .PyFrameObject_back = 24,         // offsetof(PyFrameObject, f_back)
    .PyFrameObject_code = 32,         // offsetof(PyFrameObject, f_code)
    .PyFrameObject_lineno = 124,      // offsetof(PyFrameObject, f_lineno)
    .PyFrameObject_localsplus = 376,  // offsetof(PyFrameObject, f_localsplus)
    .PyCodeObject_filename = 96,      // offsetof(PyCodeObject, co_filename)
    .PyCodeObject_name = 104,         // offsetof(PyCodeObject, co_name)
    .PyCodeObject_varnames = 64,      // offsetof(PyCodeObject, co_varnames)
    .PyTupleObject_item = 24,         // offsetof(PyTupleObject, ob_item)
    .String_data = 48,                // sizeof(PyASCIIObject)
    .String_size = 16,                // offsetof(PyVarObject, ob_size)
};

}
}  // namespace ebpf