探针php代码,PHP: 使用 SystemTap 监控 PHP DTrace 静态探针 - Manual

probe process("sapi/cli/php").provider("php").mark("compile__file__entry") {

printf("Probe compile__file__entry\n");

printf(" compile_file %s\n", user_string($arg1));

printf(" compile_file_translated %s\n", user_string($arg2));

}

probe process("sapi/cli/php").provider("php").mark("compile__file__return") {

printf("Probe compile__file__return\n");

printf(" compile_file %s\n", user_string($arg1));

printf(" compile_file_translated %s\n", user_string($arg2));

}

probe process("sapi/cli/php").provider("php").mark("error") {

printf("Probe error\n");

printf(" errormsg %s\n", user_string($arg1));

printf(" request_file %s\n", user_string($arg2));

printf(" lineno %d\n", $arg3);

}

probe process("sapi/cli/php").provider("php").mark("exception__caught") {

printf("Probe exception__caught\n");

printf(" classname %s\n", user_string($arg1));

}

probe process("sapi/cli/php").provider("php").mark("exception__thrown") {

printf("Probe exception__thrown\n");

printf(" classname %s\n", user_string($arg1));

}

probe process("sapi/cli/php").provider("php").mark("execute__entry") {

printf("Probe execute__entry\n");

printf(" request_file %s\n", user_string($arg1));

printf(" lineno %d\n", $arg2);

}

probe process("sapi/cli/php").provider("php").mark("execute__return") {

printf("Probe execute__return\n");

printf(" request_file %s\n", user_string($arg1));

printf(" lineno %d\n", $arg2);

}

probe process("sapi/cli/php").provider("php").mark("function__entry") {

printf("Probe function__entry\n");

printf(" function_name %s\n", user_string($arg1));

printf(" request_file %s\n", user_string($arg2));

printf(" lineno %d\n", $arg3);

printf(" classname %s\n", user_string($arg4));

printf(" scope %s\n", user_string($arg5));

}

probe process("sapi/cli/php").provider("php").mark("function__return") {

printf("Probe function__return: %s\n", user_string($arg1));

printf(" function_name %s\n", user_string($arg1));

printf(" request_file %s\n", user_string($arg2));

printf(" lineno %d\n", $arg3);

printf(" classname %s\n", user_string($arg4));

printf(" scope %s\n", user_string($arg5));

}

probe process("sapi/cli/php").provider("php").mark("request__shutdown") {

printf("Probe request__shutdown\n");

printf(" file %s\n", user_string($arg1));

printf(" request_uri %s\n", user_string($arg2));

printf(" request_method %s\n", user_string($arg3));

}

probe process("sapi/cli/php").provider("php").mark("request__startup") {

printf("Probe request__startup\n");

printf(" file %s\n", user_string($arg1));

printf(" request_uri %s\n", user_string($arg2));

printf(" request_method %s\n", user_string($arg3));

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值