Skip to content

Instantly share code, notes, and snippets.

@zhuizhuhaomeng
Created June 25, 2021 08:33
Show Gist options
  • Save zhuizhuhaomeng/d5b6d79149bc39d0de72e2aae00f7f2a to your computer and use it in GitHub Desktop.
Save zhuizhuhaomeng/d5b6d79149bc39d0de72e2aae00f7f2a to your computer and use it in GitHub Desktop.
File path 'ld/nginx.6.melf' cannot be resolved
File path 'ld/nginx.6.melf' cannot be resolved
File path 'dbg/nginx.5.debug' cannot be resolved
Systemtap translator/driver (version 4.6-18/0.177, commit release-4.2-779-g6862797ae176 + changes)
Copyright (C) 2005-2021 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.12.0-rc2
enabled features: BOOST_STRING_REF LIBXML2 NLS READLINE
Created temporary directory "/tmp/stapcVcOfR"
Session arch: x86_64 release: 4.18.0-240.10.1.el8_3.x86_64
Build tree: "/lib/modules/4.18.0-240.10.1.el8_3.x86_64/build"
Parsed kernel "/lib/modules/4.18.0-240.10.1.el8_3.x86_64/build/.config", containing 4489 tuples
Parsed kernel "/lib/modules/4.18.0-240.10.1.el8_3.x86_64/build/Module.symvers", containing 9714 vmlinux exports
Parsed kernel "/lib/modules/4.18.0-240.10.1.el8_3.x86_64/build/System.map", containing 49984 symbols
Pass 1: parsed user script and 18 library scripts using 48888virt/17308res/6152shr/11432data kb, in 10usr/0sys/7real ms.
excluded unused global __global_target_pgid from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_start_time from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_max from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_total from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_pcre_op_error from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_total_jit_funcs from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_var1_pgid_mode from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_hash_var1_jit_addr2size from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused global __global_hash_var1_jit_addr2offset from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused function __global_y_is_target__overload_0 from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused function __global_init_globals__overload_0 from tapset count-lj-c-on-cpu-sample.y.stp
excluded unused function __global_func_print_pcre_mode_jit_info__overload_0 from tapset count-lj-c-on-cpu-sample.y.stp
derive-probes (location #0): process("/usr/lib64/libpcre.so.1.2.12").function("_pcre_jit_exec") of keyword at count-lj-c-on-cpu-sample.y.stp:133:1
Extracting build ID.
blocklist regexps:
blfn: ^(.^)$
blfn_ret: ^(.^|_start|__.*\.get_pc_thunk\..*)$
blfile: ^(.^)$
blsection: ^(.^)
dwarf_builder::build for /usr/lib64/libpcre.so.1.2.12
parse '_pcre_jit_exec', func '_pcre_jit_exec'
pattern '/usr/lib64/libpcre.so.1.2.12' matches module '/usr/lib64/libpcre.so.1.2.12'
focused on module '/usr/lib64/libpcre.so.1.2.12' = [0x10000-0x88110, bias 0 file /home/ljl/job-21533883/dbg/libpcre.so.1.2.12.1.debug ELF machine |x86_64 (code 62)
focused on module '/usr/lib64/libpcre.so.1.2.12'
module function cache /usr/lib64/libpcre.so.1.2.12 size 667
module function cache /usr/lib64/libpcre.so.1.2.12 hit _pcre_jit_exec
querying dwarf func in file /usr/src/debug/pcre-8.44-2.fc33.x86_64/pcre_jit_compile.c count 0 (func dieoffset: 0x53eab)
selected function _pcre_jit_exec
module function cache /usr/lib64/libpcre.so.1.2.12 hit _pcre_jit_exec
querying dwarf func in file /usr/src/debug/pcre-8.44-2.fc33.x86_64/pcre_internal.h count 0 (func dieoffset: 0x51f7f)
selected function _pcre_jit_exec
suggesting 191 dwarf functions from modules:
/usr/lib64/libpcre.so.1.2.12
semantic error: while resolving probe point: identifier 'process' at count-lj-c-on-cpu-sample.y.stp:133:7
thrown from: elaborate.cxx:1081
source: probe process("/usr/lib64/libpcre.so.1.2.12").function("_pcre_jit_exec") {
^
semantic error: while resolving probe point: identifier 'process' at :133:7
thrown from: elaborate.cxx:1081
source: probe process("/usr/lib64/libpcre.so.1.2.12").function("_pcre_jit_exec") {
^
semantic error: no match (similar functions: pcre_jit_exec, pcre_dfa_exec, pcre_exec, _pcre_jit_compile, pcre_compile)
thrown from: tapsets.cxx:9155
derive-probes (location #0): timer.profile of keyword at count-lj-c-on-cpu-sample.y.stp:174:1
derive-probes (location #0): timer.profile.tick! of identifier 'timer' at count-lj-c-on-cpu-sample.y.stp:174:7
derive-probes (location #1): perf.sw.cpu_clock.sample(1000000) of identifier 'timer' at count-lj-c-on-cpu-sample.y.stp:174:7
derive-probes (location #0): perf.type(1).config(0).sample(1000000) of identifier 'perf' at /usr/local/openresty-stap/share/systemtap/tapset/timers.stp:21:46
perf probe type=1 config=0 period=1000000 process= counter=
symbol resolution for derived-probe probe perf.type(1).config(0).sample(1000000) /* <- perf.type(1).config(0).sample(1000000) */{
{
};
{
{
};
{
if (!(y_is_target())) {
next;
}
;
init_globals();
(var1_total)++;
if ((var1_total) >= (var1_max)) {
abort();
}
;
};
};
}
function y_is_target is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
function target is defined in new-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
local _target is already defined
global target_pgid is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
global target_pgid is already defined
local _target is already defined
function error is defined in new-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
function abort is defined in chosen-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
global target_pgid is already defined
function pgrp is defined in chosen-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
local _target is already defined
function pid is defined in chosen-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
global target_pgid is already defined
global target_pgid is already defined
function init_globals is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
global var1_total is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
global var1_total is already defined
global var1_max is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
derive-probes (location #0): timer.s(1) of keyword at count-lj-c-on-cpu-sample.y.stp:191:1
symbol resolution for derived-probe probe timer.s(1) /* <- timer.s(1) */{
init_globals();
abort();
}
derive-probes (location #0): end of keyword at count-lj-c-on-cpu-sample.y.stp:198:1
symbol resolution for derived-probe probe end /* <- end */{
init_globals();
foreach ([var16_addr+] in hash_var1_jit_addr2size) {
(var16_sz) = (hash_var1_jit_addr2size[var16_addr]);
printf("function: start 0x%x, size: %d, offset: %d\\n", var16_addr, var16_sz, hash_var1_jit_addr2offset[var16_addr]);
};
printf("=== re addr end ===\\n");
printf("\\ntotal frames: %d in %d us\\n", var1_total, (gettimeofday_us()) - (var1_start_time));
}
global hash_var1_jit_addr2size is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
local var16_addr is already defined
global hash_var1_jit_addr2size is already defined
local var16_addr is already defined
local var16_sz is already defined
local var16_addr is already defined
global hash_var1_jit_addr2offset is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
global var1_total is already defined
function gettimeofday_us is defined in new-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/linux/timestamp_gtod.stp
function gettimeofday_ns is defined in chosen-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/linux/timestamp_gtod.stp
global var1_start_time is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
derive-probes (location #0): begin of keyword at count-lj-c-on-cpu-sample.y.stp:213:1
symbol resolution for derived-probe probe begin /* <- begin */{
init_globals();
warn("Start tracing...\n");
if ((var1_pgid_mode) != (0)) {
printf("running in pgid mode\\n");
}
;
(var1_start_time) = (gettimeofday_us());
}
function warn is defined in chosen-tapset-file /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
global var1_pgid_mode is defined in chosen-tapset-file count-lj-c-on-cpu-sample.y.stp
global var1_start_time is already defined
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
excluded unused function __global_execname__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_pexecname__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_pid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_tid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_tid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ppid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_ppid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_pgrp__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_sid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_sid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_gid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_gid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_egid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_egid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_uid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_uid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_euid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_ns_euid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_is_myproc__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_cpu__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_registers_valid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_user_mode__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_is_return__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_module_name__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_module_size__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_stp_pid__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_remote_id__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_remote_uri__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_stack_size__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_stack_used__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_stack_unused__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_addr__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_uaddr__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_cmdline_args__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_cmdline_arg__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
excluded unused function __global_cmdline_str__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/context.stp
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
excluded unused function __global_log__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
excluded unused function __global_exit__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
excluded unused function __global_assert__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
excluded unused function __global_assert__overload_1 from tapset /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
excluded unused function __global_stp_print_binary__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/logging.stp
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
excluded unused function __global_gettimeofday_ms__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/timestamp_gtod.stp
excluded unused function __global_gettimeofday_s__overload_0 from tapset /usr/local/openresty-stap/share/systemtap/tapset/linux/timestamp_gtod.stp
symbol resolution for function function abort ()
%{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function error (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%}
symbol resolution for function function gettimeofday_ns ()
%{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%}
symbol resolution for function function gettimeofday_us ()
{
return (__global_gettimeofday_ns__overload_0()) / (1000);
}
symbol resolution for function function init_globals ()
{
}
symbol resolution for function function pgrp ()
%{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%}
symbol resolution for function function pid ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
}
symbol resolution for function function target ()
{
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
}
symbol resolution for function function warn (msg)
%{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%}
symbol resolution for function function y_is_target ()
{
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
}
deleting module_cache
# global embedded code
%{
#define STAP_NEED_GETTIMEOFDAY 1
%}
# globals
target_pgid:long = 0
var1_total:long = 0
var1_max:long = 100
hash_var1_jit_addr2size:unknown [unknown]
hash_var1_jit_addr2offset:unknown [unknown]
var1_start_time:unknown
var1_pgid_mode:long = 0
# functions
abort:unknown ()
{ %{ /* unprivileged */
atomic_set (session_state(), STAP_SESSION_STOPPING);
_stp_exit ();
CONTEXT->aborted = 1;
CONTEXT->last_stmt = NULL;
%} }
error:unknown (msg:string)
{ %{ /* unprivileged */ /* unmodified-fnargs */
/* NB: we used to reuse msg[] for an assignment to last_error; this
is clearer & safer. */
strlcpy (CONTEXT->error_buffer, STAP_ARG_msg, MAXSTRINGLEN);
CONTEXT->last_error = CONTEXT->error_buffer;
CONTEXT->last_stmt = NULL;
%} }
gettimeofday_ns:long ()
{ %{ /* pure */ /* unprivileged */
/* NOTE: we can't use do_gettimeofday because we could be called from a
* context where xtime_lock is already held. See bug #2525. */
STAP_RETVALUE = _stp_gettimeofday_ns();
if (STAP_RETVALUE < 0)
CONTEXT->last_error = "gettimeofday not initialized";
%} }
gettimeofday_us:long ()
{ {
return (__global_gettimeofday_ns__overload_0()) / (1000);
} }
init_globals:unknown ()
{ {
} }
pgrp:long ()
{ %{ /* pure */ /* unprivileged */ /* stable */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
struct signal_struct *ss = kread( &(current->signal) );
STAP_RETVALUE = kread ( &(ss->pgrp) );
CATCH_DEREF_FAULT();
#else
STAP_RETVALUE = task_pgrp_nr_ns(current, &init_pid_ns);
#endif
%} }
pid:long ()
{ {
return %{ /* pure */ /* unprivileged */ /* stable */ current->tgid %};
} }
target:long ()
{ {
return %{ /* pure */ /* unprivileged */ /* stable */ _stp_target %};
} }
warn:unknown (msg:string)
{ %{ /* unprivileged */ /* unmodified-fnargs */
_stp_warn ("%s", STAP_ARG_msg);
%} }
y_is_target:unknown ()
# locals
_target:unknown
{ {
(_target) = (__global_target__overload_0());
if ((_target) != (0)) {
if ((__global_target_pgid) != (0)) {
if ((__global_target_pgid) != (_target)) {
__global_error__overload_0("should not specify target process and target_pgid at the same time.");
__global_abort__overload_0();
}
;
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
return (_target) == (__global_pid__overload_0());
}
;
if ((__global_target_pgid) != (0)) {
return (__global_target_pgid) == (__global_pgrp__overload_0());
}
;
__global_error__overload_0("ylang --exe-only is not specified but no target pid nor pgid is specified at runtime");
__global_abort__overload_0();
} }
# probes
perf.type(1).config(0).sample(1000000) /* <- perf.type(1).config(0).sample(1000000) */
{ {
{
};
{
{
};
{
if (!(__global_y_is_target__overload_0())) {
next;
}
;
__global_init_globals__overload_0();
(__global_var1_total)++;
if ((__global_var1_total) >= (__global_var1_max)) {
__global_abort__overload_0();
}
;
};
};
} }
timer.s(1) /* <- timer.s(1) */
{ {
__global_init_globals__overload_0();
__global_abort__overload_0();
} }
end /* <- end */
# locals
var16_addr:unknown
var16_sz:unknown
{ {
__global_init_globals__overload_0();
foreach ([var16_addr+] in __global_hash_var1_jit_addr2size) {
(var16_sz) = (__global_hash_var1_jit_addr2size[var16_addr]);
printf("function: start 0x%x, size: %d, offset: %d\\n", var16_addr, var16_sz, __global_hash_var1_jit_addr2offset[var16_addr]);
};
printf("=== re addr end ===\\n");
printf("\\ntotal frames: %d in %d us\\n", __global_var1_total, (__global_gettimeofday_us__overload_0()) - (__global_var1_start_time));
} }
begin /* <- begin */
{ {
__global_init_globals__overload_0();
__global_warn__overload_0("Start tracing...\n");
if ((__global_var1_pgid_mode) != (0)) {
printf("running in pgid mode\\n");
}
;
(__global_var1_start_time) = (__global_gettimeofday_us__overload_0());
} }
Pass 2: analyzed script: 4 probes, 10 functions, 1 embed, 7 globals using 50204virt/20272res/7716shr/12748data kb, in 10usr/0sys/12real ms.
Pass 2: analysis failed. [man error::pass2]
Running rm -rf /tmp/stapcVcOfR
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/stapcVcOfR"
real 0m0.191s
user 0m0.182s
sys 0m0.007s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment