function get_type:string (obj) {
if (obj == 0)
return ""
- ob_type = @cast (obj, "PyObject", @PYTHON2_LIBRARY)->ob_type
+ ob_type = @cast (obj, "PyObject")->ob_type
if (ob_type == 0)
return ""
- ob_type_name = @cast (ob_type, "PyTypeObject", @PYTHON2_LIBRARY)->tp_name
+ ob_type_name = @cast (ob_type, "PyTypeObject")->tp_name
return set_string (ob_type_name)
}
function get_filename (f_code)
{
- co_filename = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_filename;
- co_filename_s = @cast (co_filename, "PyStringObject", @PYTHON2_LIBRARY)->ob_sval;
+ co_filename = @cast (f_code, "PyCodeObject")->co_filename;
+ co_filename_s = @cast (co_filename, "PyStringObject")->ob_sval;
return set_string (co_filename_s)
}
function get_name (f_code)
{
- co_name = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_name;
- co_name_s = @cast (co_name, "PyStringObject", @PYTHON2_LIBRARY)->ob_sval;
+ co_name = @cast (f_code, "PyCodeObject")->co_name;
+ co_name_s = @cast (co_name, "PyStringObject")->ob_sval;
return set_string (co_name_s)
}
function get_sequence_item (tuple, i, seq_type) {
if (seq_type == "tuple")
- ob_items = @cast (tuple, "PyTupleObject", @PYTHON2_LIBRARY)->ob_item;
+ ob_items = @cast (tuple, "PyTupleObject")->ob_item;
else if (seq_type == "list")
- ob_items = @cast (tuple, "PyListObject", @PYTHON2_LIBRARY)->ob_item;
+ ob_items = @cast (tuple, "PyListObject")->ob_item;
ob_item = user_long (ob_items + (i * uarch_bytes()))
return ob_item
}
value_type_str = get_type (value)
if (value_type_str == "str") {
- value_s = @cast (value, "PyStringObject", @PYTHON2_LIBRARY)->ob_sval;
+ value_s = @cast (value, "PyStringObject")->ob_sval;
value_str = set_string (value_s)
printf ("%s\"%s\"%s", prefix, value_str, suffix)
}
else if (value_type_str == "int") {
- arg_value_int = @cast (value, "PyIntObject", @PYTHON2_LIBRARY)->ob_ival;
+ arg_value_int = @cast (value, "PyIntObject")->ob_ival;
printf ("%s%d%s", prefix, arg_value_int, suffix)
}
else if (value_type_str == "tuple" || value_type_str == "list") {
- n = @cast (value, "PyTupleObject", @PYTHON2_LIBRARY)->ob_size;
+ n = @cast (value, "PyTupleObject")->ob_size;
if (value_type_str == "list") printf (" = [")
else printf (" = ")
for (i = 0; i < n; i++)
}
else if (value_type_str == "set") {
printf (" = {")
- n = @cast (value, "PySetObject", @PYTHON2_LIBRARY)->used;
+ n = @cast (value, "PySetObject")->used;
for (i = 0; i <= n; i++)
display_value (get_set_item (value, i), " ", ",")
printf ("}")
}
else if (value_type_str == "dict") {
printf (" = {")
- n = @cast (value, "PyDictObject", @PYTHON2_LIBRARY)->ma_used;
+ n = @cast (value, "PyDictObject")->ma_used;
for (i = 0; i <= n; i++) {
dict_hash = get_dict_hash (value, i)
dict_key = get_dict_key (value, i)
# RETURNS: set entry PyObject
function get_set_item (set, i) {
- entries = @cast (set, "PySetObject", @PYTHON2_LIBRARY)->table;
- n = @cast (set, "PySetObject", @PYTHON2_LIBRARY)->used;
+ entries = @cast (set, "PySetObject")->table;
+ n = @cast (set, "PySetObject")->used;
if (i > n)
return 0
- return @cast (entries, "setentry", @PYTHON2_LIBRARY)[i]->key
+ return @cast (entries, "setentry")[i]->key
}
# FUNCTION GET_DICT_HASH
# RETURNS: DICT_HASH
function get_dict_hash (dict, i) {
- entries = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_table;
- n = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_table;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n)
return 0
- return @cast (entries, "PyDictEntry", @PYTHON2_LIBRARY)[i]->me_hash
+ return @cast (entries, "PyDictEntry")[i]->me_hash
}
# FUNCTION GET_DICT_KEY
# RETURNS: DICT_KEY
function get_dict_key (dict, i) {
- entries = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_table;
- n = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_table;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n)
return 0
- return @cast (entries, "PyDictEntry", @PYTHON2_LIBRARY)[i]->me_key
+ return @cast (entries, "PyDictEntry")[i]->me_key
}
# FUNCTION GET_DICT_VALUE
# RETURNS: DICT_VALUE
function get_dict_value (dict, i) {
- entries = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_table;
- n = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_table;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n)
return 0
- return @cast (entries, "PyDictEntry", @PYTHON2_LIBRARY)[i]->me_value;
+ return @cast (entries, "PyDictEntry")[i]->me_value;
}
# FUNCTION DISPLAY_DICT_VARIABLE
# NAMESPACE: local or global
function display_dict_variable (dict, variable, namespace, co_name_str, co_filename_str) {
- n = @cast (dict, "PyDictObject", @PYTHON2_LIBRARY)->ma_used;
+ n = @cast (dict, "PyDictObject")->ma_used;
for (i = 0; i < n; i++) {
dict_key = get_dict_key (dict, i)
dict_value = get_dict_value (dict, i)
if (dict_key == 0 || dict_value == 0) break
- key_str = set_string (@cast (dict_key, "PyStringObject", @PYTHON2_LIBRARY)->ob_sval)
+ key_str = set_string (@cast (dict_key, "PyStringObject")->ob_sval)
key_type_str = get_type (dict_key)
if (wildcard_match (key_str, variable)) {
{
if (frame_n != 0) {
python2_frame_n += 1
- frame = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_back
+ frame = @cast (frame, "PyFrameObject")->f_back
}
else
python2_frame_n = 0
if (skip_name == "")
skip_name = "/lib64/"
- f_code = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_code;
+ f_code = @cast (frame, "PyFrameObject")->f_code;
co_filename_str = get_filename (f_code)
if (isinstr (co_filename_str, "importlib") == 1 || isinstr (co_filename_str, "<string>") == 1 || isinstr (co_filename_str, "/lib64/") == 1)
return 0
if (skip_name != "" && isinstr (co_filename_str, skip_name) == 1)
return 0
co_name_str = get_name (f_code)
- co_firstlineno = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_firstlineno;
+ co_firstlineno = @cast (f_code, "PyCodeObject")->co_firstlineno;
printf ("#%d %s ", python2_frame_n, co_name_str)
- co_varnames = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_varnames;
- co_argcount = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_argcount;
- f_localsplus = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_localsplus;
+ co_varnames = @cast (f_code, "PyCodeObject")->co_varnames;
+ co_argcount = @cast (f_code, "PyCodeObject")->co_argcount;
+ f_localsplus = @cast (frame, "PyFrameObject")->f_localsplus;
for (i = 0; i < co_argcount; i++) {
if (i == 0) print ("(");
- arg_name_str = user_string (@cast (get_sequence_item (co_varnames, i, "tuple"), "PyStringObject", @PYTHON2_LIBRARY)->ob_sval)
+ arg_name_str = user_string (@cast (get_sequence_item (co_varnames, i, "tuple"), "PyStringObject")->ob_sval)
arg_value = user_long (f_localsplus + (i * uarch_bytes()))
arg_type_name_str = get_type (arg_value)
printf ("%s:%s ", arg_name_str, arg_type_name_str)
function python2_getvar_one_frame (frame, match_args, variable, skip_name)
{
- f_code = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_code;
+ f_code = @cast (frame, "PyFrameObject")->f_code;
co_filename_str = get_filename (f_code)
if (isinstr (co_filename_str, "importlib") == 1 || isinstr (co_filename_str, "<string>") == 1 || isinstr (co_filename_str, "/lib64/") == 1)
return 0
return 0
co_name_str = get_name (f_code)
- f_globals = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_globals;
+ f_globals = @cast (frame, "PyFrameObject")->f_globals;
if (f_globals != 0) {
display_dict_variable (f_globals, variable, "global", co_name_str, co_filename_str)
}
- f_locals = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_locals;
+ f_locals = @cast (frame, "PyFrameObject")->f_locals;
if (f_locals != 0) {
display_dict_variable (f_locals, variable, "local", co_name_str, co_filename_str)
}
- co_varnames = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_varnames;
- co_argcount = @cast (f_code, "PyCodeObject", @PYTHON2_LIBRARY)->co_argcount;
- f_localsplus = @cast (frame, "PyFrameObject", @PYTHON2_LIBRARY)->f_localsplus;
- ob_size = @cast (co_varnames, "PyTypeObject", @PYTHON2_LIBRARY)->ob_size;
+ co_varnames = @cast (f_code, "PyCodeObject")->co_varnames;
+ co_argcount = @cast (f_code, "PyCodeObject")->co_argcount;
+ f_localsplus = @cast (frame, "PyFrameObject")->f_localsplus;
+ ob_size = @cast (co_varnames, "PyTypeObject")->ob_size;
# iterate through the local variable list
for (i = 0; i < ob_size; i++) {
- arg_name_str = user_string (@cast (get_sequence_item (co_varnames, i, "tuple"), "PyStringObject", @PYTHON2_LIBRARY)->ob_sval)
+ arg_name_str = user_string (@cast (get_sequence_item (co_varnames, i, "tuple"), "PyStringObject")->ob_sval)
if (! wildcard_match (arg_name_str, variable))
continue
arg_value = user_long (f_localsplus + (i * uarch_bytes()))
}
}
-probe python2.function_entry = process(@PYTHON2_LIBRARY).mark ("function__entry")
+probe python2.function_entry = process("/usr/lib*/libpython2.*.so.1*").mark ("function__entry")
{
# fedora and rhel python pass function name and line number, not frame pointer
# so grab the frame pointer using debuginfo
python2_frame = $f
}
-probe python2.function_return = process(@PYTHON2_LIBRARY).mark ("function__return")
+probe python2.function_return = process("/usr/lib*/libpython2.*.so.1*").mark ("function__return")
{
# fedora and rhel python pass function name and line number, not frame pointer
# unfortunately the frame pointer is not always available in debuginfo
function p3_get_type:string (obj) {
if (obj == 0)
return ""
- ob_type = @cast (obj, "PyObject", @PYTHON3_LIBRARY)->ob_type
+ ob_type = @cast (obj, "PyObject")->ob_type
if (ob_type == 0)
return ""
- ob_type_name = @cast (ob_type, "PyTypeObject", @PYTHON3_LIBRARY)->tp_name
+ ob_type_name = @cast (ob_type, "PyTypeObject")->tp_name
return p3_set_string (ob_type_name)
}
function p3_get_filename (f_code)
{
- co_filename = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_filename;
+ co_filename = @cast (f_code, "PyCodeObject")->co_filename;
return get_unicode (co_filename)
}
function p3_get_name (f_code)
{
- co_name = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_name;
+ co_name = @cast (f_code, "PyCodeObject")->co_name;
return get_unicode (co_name)
}
function get_unicode:string (utf16) {
if (utf16 == 0)
return ""
- compact = @cast (utf16, "PyASCIIObject", @PYTHON3_LIBRARY)->state->compact;
- ascii = @cast (utf16, "PyASCIIObject", @PYTHON3_LIBRARY)->state->ascii
- length = @cast (utf16, "PyASCIIObject", @PYTHON3_LIBRARY)->length;
+ compact = @cast (utf16, "PyASCIIObject")->state->compact;
+ ascii = @cast (utf16, "PyASCIIObject")->state->ascii
+ length = @cast (utf16, "PyASCIIObject")->length;
if (compact)
if (ascii)
# this odd incantation is to fetch the data which python3 allocates after the PyASCIIObject struct
- unip = &@cast (utf16, "PyASCIIObject", @PYTHON3_LIBRARY)[1]->ob_base->ob_refcnt
+ unip = &@cast (utf16, "PyASCIIObject")[1]->ob_base->ob_refcnt
else
- unip = &@cast (utf16, "PyCompactUnicodeObject", @PYTHON3_LIBRARY)[1]->_base->ob_base->ob_refcnt
+ unip = &@cast (utf16, "PyCompactUnicodeObject")[1]->_base->ob_base->ob_refcnt
else
- unip = &@cast (utf16, "PyUnicodeObject", @PYTHON3_LIBRARY)->data->any
+ unip = &@cast (utf16, "PyUnicodeObject")->data->any
if (length == 0 || unip == 0)
function p3_get_sequence_item (tuple, i, seq_type) {
if (seq_type == "tuple")
- ob_items = @cast (tuple, "PyTupleObject", @PYTHON3_LIBRARY)->ob_item;
+ ob_items = @cast (tuple, "PyTupleObject")->ob_item;
else if (seq_type == "list")
- ob_items = @cast (tuple, "PyListObject", @PYTHON3_LIBRARY)->ob_item;
+ ob_items = @cast (tuple, "PyListObject")->ob_item;
ob_item = user_long (ob_items + (i * uarch_bytes()))
return ob_item
printf ("%s\"%s\"%s", prefix, value_str, suffix)
}
else if (value_type_str == "int") {
- if (@cast (value, "PyLongObject", @PYTHON3_LIBRARY)->ob_base->ob_size == 1)
- printf ("%s%d%s", prefix, user_int(@cast (value, "PyLongObject", @PYTHON3_LIBRARY)[0]->ob_digit), suffix)
- else if (@cast (value, "PyLongObject", @PYTHON3_LIBRARY)->ob_base->ob_size == 2) {
- printf ("%s%#lx", prefix, user_int(@cast (value, "PyLongObject", @PYTHON3_LIBRARY)[0]->ob_digit + 4) >> 2)
- printf ("%x%s", user_int(@cast (value, "PyLongObject", @PYTHON3_LIBRARY)[0]->ob_digit) | ((user_int(@cast (value, "PyLongObject", @PYTHON3_LIBRARY)[0]->ob_digit + 4) << 30) & 0xffffffff), suffix)
+ if (@cast (value, "PyLongObject")->ob_base->ob_size == 1)
+ printf ("%s%d%s", prefix, user_int(@cast (value, "PyLongObject")[0]->ob_digit), suffix)
+ else if (@cast (value, "PyLongObject")->ob_base->ob_size == 2) {
+ printf ("%s%#lx", prefix, user_int(@cast (value, "PyLongObject")[0]->ob_digit + 4) >> 2)
+ printf ("%x%s", user_int(@cast (value, "PyLongObject")[0]->ob_digit) | ((user_int(@cast (value, "PyLongObject")[0]->ob_digit + 4) << 30) & 0xffffffff), suffix)
}
}
else if (value_type_str == "tuple" || value_type_str == "list") {
- n = @cast (value, "PyTupleObject", @PYTHON3_LIBRARY)->ob_base->ob_size;
+ n = @cast (value, "PyTupleObject")->ob_base->ob_size;
if (value_type_str == "list") printf (" = [")
else printf (" = ")
for (i = 0; i < n; i++)
}
else if (value_type_str == "set") {
printf (" = {")
- n = @cast (value, "PySetObject", @PYTHON3_LIBRARY)->used;
+ n = @cast (value, "PySetObject")->used;
for (i = 0; i <= n; i++)
p3_display_value (p3_get_set_item (value, i), " ", ",")
printf ("}")
}
else if (value_type_str == "dict") {
printf (" = {")
- n = @cast (value, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
+ n = @cast (value, "PyDictObject")->ma_used;
for (i = 0; i <= n; i++) {
dict_hash = p3_get_dict_hash (value, i)
dict_key = p3_get_dict_key (value, i)
# RETURNS: set entry PyObject
function p3_get_set_item (set, i) {
- entries = @cast (set, "PySetObject", @PYTHON3_LIBRARY)->table;
- n = @cast (set, "PySetObject", @PYTHON3_LIBRARY)->used;
+ entries = @cast (set, "PySetObject")->table;
+ n = @cast (set, "PySetObject")->used;
if (i > n)
return 0
- return @cast (entries, "setentry", @PYTHON3_LIBRARY)[i]->key
+ return @cast (entries, "setentry")[i]->key
}
# FUNCTION P3_GET_DICT_HASH
# RETURNS: DICT_HASH
function p3_get_dict_hash (dict, i) {
- entries = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_keys;
- n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_keys;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_hash
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry")[i]->me_hash
}
# FUNCTION P3_GET_DICT_KEY
# RETURNS: DICT_KEY
function p3_get_dict_key (dict, i) {
- entries = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_keys;
- n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_keys;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_key
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry")[i]->me_key
}
# FUNCTION P3_GET_DICT_VALUE
# RETURNS: DICT_VALUE
function p3_get_dict_value (dict, i) {
- if (@cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_values) {
+ if (@cast (dict, "PyDictObject")->ma_values) {
# ?? is this correct for split keys and values table
- return @cast (entries, "PyDictObject", @PYTHON3_LIBRARY)->ma_values[i];
+ return @cast (entries, "PyDictObject")->ma_values[i];
}
else {
# combined keys and values table
- entries = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_keys;
- n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
+ entries = @cast (dict, "PyDictObject")->ma_keys;
+ n = @cast (dict, "PyDictObject")->ma_used;
if (i > n || entries == 0)
return 0
- return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry", @PYTHON3_LIBRARY)[i]->me_value
+ return @cast (@DK_ENTRIES(entries), "PyDictKeyEntry")[i]->me_value
}
}
# NAMESPACE: local or global
function p3_display_dict_variable (dict, variable, namespace, co_name_str, co_filename_str) {
- n = @cast (dict, "PyDictObject", @PYTHON3_LIBRARY)->ma_used;
+ n = @cast (dict, "PyDictObject")->ma_used;
for (i = 0; i < n; i++) {
dict_key = p3_get_dict_key (dict, i)
dict_value = p3_get_dict_value (dict, i)
dict_hash = p3_get_dict_hash (dict, i)
if (dict_hash == 0 || dict_value == 0)
continue
-# key_str = p3_set_string (@cast (dict_key, "PyUnicodeObject", @PYTHON3_LIBRARY)->str)
+# key_str = p3_set_string (@cast (dict_key, "PyUnicodeObject")->str)
key_str = get_unicode (dict_key)
key_type_str = p3_get_type (dict_key)
{
if (frame_n != 0) {
python3_frame_n += 1
- frame = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_back
+ frame = @cast (frame, "PyFrameObject")->f_back
}
else
python3_frame_n = 0
function python3_backtrace_one_frame (frame, match_filename)
{
- f_code = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_code;
+ f_code = @cast (frame, "PyFrameObject")->f_code;
co_filename_str = p3_get_filename (f_code)
if (isinstr (co_filename_str, "importlib") == 1 || isinstr (co_filename_str, "<string>") == 1 || isinstr (co_filename_str, "/lib64/") == 1)
return 0
if (match_filename != "" && isinstr (co_filename_str, match_filename) == 1)
return 0
co_name_str = p3_get_name (f_code)
- co_firstlineno = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_firstlineno;
+ co_firstlineno = @cast (f_code, "PyCodeObject")->co_firstlineno;
printf ("#%d %s ", python3_frame_n, co_name_str)
- co_varnames = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_varnames;
- co_argcount = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_argcount;
- f_localsplus = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_localsplus;
+ co_varnames = @cast (f_code, "PyCodeObject")->co_varnames;
+ co_argcount = @cast (f_code, "PyCodeObject")->co_argcount;
+ f_localsplus = @cast (frame, "PyFrameObject")->f_localsplus;
for (i = 0; i < co_argcount; i++) {
if (i == 0) print ("(");
arg_name_str = get_unicode (p3_get_sequence_item (co_varnames, i, "tuple"))
function python3_getvar_one_frame (frame, match_args, variable, match_filename)
{
- f_code = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_code;
+ f_code = @cast (frame, "PyFrameObject")->f_code;
co_filename_str = p3_get_filename (f_code)
if (isinstr (co_filename_str, "importlib") == 1 || isinstr (co_filename_str, "<string>") == 1 || isinstr (co_filename_str, "/lib64/") == 1)
return 0
return 0
co_name_str = p3_get_name (f_code)
- f_globals = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_globals;
+ f_globals = @cast (frame, "PyFrameObject")->f_globals;
if (f_globals != 0) {
p3_display_dict_variable (f_globals, variable, "global", co_name_str, co_filename_str)
}
- f_locals = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_locals;
+ f_locals = @cast (frame, "PyFrameObject")->f_locals;
if (f_locals != 0) {
p3_display_dict_variable (f_locals, variable, "local", co_name_str, co_filename_str)
}
- co_varnames = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_varnames;
- co_argcount = @cast (f_code, "PyCodeObject", @PYTHON3_LIBRARY)->co_argcount;
- f_localsplus = @cast (frame, "PyFrameObject", @PYTHON3_LIBRARY)->f_localsplus;
- ob_size = @cast (co_varnames, "PyTypeObject", @PYTHON3_LIBRARY)->ob_base->ob_size;
+ co_varnames = @cast (f_code, "PyCodeObject")->co_varnames;
+ co_argcount = @cast (f_code, "PyCodeObject")->co_argcount;
+ f_localsplus = @cast (frame, "PyFrameObject")->f_localsplus;
+ ob_size = @cast (co_varnames, "PyTypeObject")->ob_base->ob_size;
# iterate through the local variable list
for (i = 0; i < ob_size; i++) {
arg_name_str = get_unicode (p3_get_sequence_item (co_varnames, i, "tuple"))
}
}
-probe python3.function_entry = process(@PYTHON3_LIBRARY).mark ("function__entry")
+probe python3.function_entry = process("/usr/lib64/libpython3.*.so.1*").mark ("function__entry")
{
# fedora and rhel python pass function name and line number, not frame pointer
# so grab the frame pointer using debuginfo
python3_frame = $f
}
-probe python3.function_return = process(@PYTHON3_LIBRARY).mark ("function__return")
+probe python3.function_return = process("/usr/lib64/libpython3.*.so.1*").mark ("function__return")
{
# fedora and rhel python pass function name and line number, not frame pointer
# unfortunately the frame pointer is not always available in debuginfo