From 12c0c9ff088b39875f7129b37d4b43e6aafd6b1e Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 3 Mar 2014 13:37:10 -0600 Subject: [PATCH] Added support for '.callee' probes to the 'unprivileged' testcases. * testsuite/systemtap.unprivileged/unprivileged_myproc.exp: Add support for '.callee' probe variants. * testsuite/systemtap.unprivileged/unprivileged_probes.exp: Ditto. --- .../unprivileged_myproc.exp | 34 ++++++++++++++++ .../unprivileged_probes.exp | 40 +++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/testsuite/systemtap.unprivileged/unprivileged_myproc.exp b/testsuite/systemtap.unprivileged/unprivileged_myproc.exp index 76632930d..9aa7cd3e1 100644 --- a/testsuite/systemtap.unprivileged/unprivileged_myproc.exp +++ b/testsuite/systemtap.unprivileged/unprivileged_myproc.exp @@ -21,6 +21,9 @@ set myproc_probe_types [list \ "process.function(string).label(string)" \ "process.function(string).return" \ "process.function(string).exported" \ + "process.function(string).callee(string)" \ + "process.function(string).callees" \ + "process.function(string).callees(number)" \ "process.plt" \ "process.plt.statement(number)" \ "process.plt(string)" \ @@ -36,6 +39,9 @@ set myproc_probe_types [list \ "process.library(string).function(string).return" \ "process.library(string).function(string).exported" \ "process.library(string).function(string).label(string)" \ + "process.library(string).function(string).callee(string)" \ + "process.library(string).function(string).callees" \ + "process.library(string).function(string).callees(number)" \ "process.library(string).plt" \ "process.library(string).plt.statement(number)" \ "process.library(string).plt(string)" \ @@ -74,6 +80,9 @@ set myproc_probe_types [list \ "process(string).function(string).inline" \ "process(string).function(string).return" \ "process(string).function(string).exported" \ + "process(string).function(string).callee(string)" \ + "process(string).function(string).callees" \ + "process(string).function(string).callees(number)" \ "process(string).insn" \ "process(string).insn.block" \ "process(string).library(string).function(number)" \ @@ -87,6 +96,9 @@ set myproc_probe_types [list \ "process(string).library(string).function(string).return" \ "process(string).library(string).function(string).exported" \ "process(string).library(string).function(string).label(string)" \ + "process(string).library(string).function(string).callee(string)" \ + "process(string).library(string).function(string).callees" \ + "process(string).library(string).function(string).callees(number)" \ "process(string).library(string).mark(string)" \ "process(string).library(string).provider(string).mark(string)" \ "process(string).library(string).statement(number)" \ @@ -136,6 +148,28 @@ proc add_args { probe_type pid } { # Replace "function(string).inline" with "function("ibar").inline" regsub -all "function\\(string\\).inline" $probe "function(\"ibar\").inline" probe + # Replace 'library(string).function(string).callee(string)' with + # 'library(string).function("libloopfun").callee("ilibloopfunc")' + regsub -all "library\\(string\\).function\\(string\\).callee\\(string\\)" \ + $probe \ + "library(string).function(\"libloopfunc\").callee(\"ilibloopfunc\")" \ + probe + # Replace 'library(string).function(string).callees' with + # 'library(string).function("libloopfunc").callees' + regsub -all "library\\(string\\).function\\(string\\).callees" $probe \ + "library(string).function(\"libloopfunc\").callees" probe + + # Replace 'function(string).callee(string)' with + # 'function("main").callee("tbar")' + regsub -all "function\\(string\\).callee\\(string\\)" $probe \ + "function(\"main\").callee(\"tbar\")" probe + # Replace 'function(string).callees' with 'function("main").callees' + regsub -all "function\\(string\\).callees" $probe \ + "function(\"main\").callees" probe + + # Replace 'callees(number)' with 'callees(1)' + regsub -all "callees\\(number\\)" $probe "callees(1)" probe + # Replace "library(string).function(string)" with "library(string.function("libloopfunc")" regsub -all "library\\(string\\).function\\(string\\)" $probe "library(string).function(\"libloopfunc\")" probe # Replace "library(string).function(number)" with "library(string).function($addr_of_libloopfunc)" diff --git a/testsuite/systemtap.unprivileged/unprivileged_probes.exp b/testsuite/systemtap.unprivileged/unprivileged_probes.exp index 1b6cbb129..e5184637a 100644 --- a/testsuite/systemtap.unprivileged/unprivileged_probes.exp +++ b/testsuite/systemtap.unprivileged/unprivileged_probes.exp @@ -32,6 +32,9 @@ set unrestricted_probe_types [list \ "process.function(string).label(string)" \ "process.function(string).return" \ "process.function(string).exported" \ + "process.function(string).callee(string)" \ + "process.function(string).callees" \ + "process.function(string).callees(number)" \ "process.plt" \ "process.plt.statement(number)" \ "process.plt(string)" \ @@ -47,6 +50,9 @@ set unrestricted_probe_types [list \ "process.library(string).function(string).return" \ "process.library(string).function(string).exported" \ "process.library(string).function(string).label(string)" \ + "process.library(string).function(string).callee(string)" \ + "process.library(string).function(string).callees" \ + "process.library(string).function(string).callees(number)" \ "process.library(string).plt" \ "process.library(string).plt.statement(number)" \ "process.library(string).plt(string)" \ @@ -84,6 +90,9 @@ set unrestricted_probe_types [list \ "process(string).function(string).label(string)" \ "process(string).function(string).return" \ "process(string).function(string).exported" \ + "process(string).function(string).callee(string)" \ + "process(string).function(string).callees" \ + "process(string).function(string).callees(number)" \ "process(string).library(string).function(number)" \ "process(string).library(string).function(number).call" \ "process(string).library(string).function(number).inline" \ @@ -95,6 +104,9 @@ set unrestricted_probe_types [list \ "process(string).library(string).function(string).return" \ "process(string).library(string).function(string).exported" \ "process(string).library(string).function(string).label(string)" \ + "process(string).library(string).function(string).callee(string)" \ + "process(string).library(string).function(string).callees" \ + "process(string).library(string).function(string).callees(number)" \ "process(string).library(string).mark(string)" \ "process(string).library(string).provider(string).mark(string)" \ "process(string).library(string).statement(number)" \ @@ -158,6 +170,9 @@ set restricted_probe_types [list \ "kernel.function(string).return" \ "kernel.function(string).exported" \ "kernel.function(string).return.maxactive(number)" \ + "kernel.function(string).callee(string)" \ + "kernel.function(string).callees" \ + "kernel.function(string).callees(number)" \ "kernel.mark(string)" \ "kernel.mark(string).format(string)" \ "kernel.statement(number)" \ @@ -185,6 +200,9 @@ set restricted_probe_types [list \ "module(string).function(string).return" \ "module(string).function(string).exported" \ "module(string).function(string).return.maxactive(number)" \ + "module(string).function(string).callee(string)" \ + "module(string).function(string).callees" \ + "module(string).function(string).callees(number)" \ "module(string).statement(number)" \ "module(string).statement(string)" \ "perf.type(number).config(number)" \ @@ -239,6 +257,28 @@ proc add_args { probe_type } { # Replace "function(string).inline" with "function("ibar").inline" regsub -all "function\\(string\\).inline" $probe "function(\"ibar\").inline" probe + # Replace 'library(string).function(string).callee(string)' with + # 'library(string).function("libloopfun").callee("ilibloopfunc")' + regsub -all "library\\(string\\).function\\(string\\).callee\\(string\\)" \ + $probe \ + "library(string).function(\"libfoofunc\").callee(\"ilibfoofunc\")" \ + probe + # Replace 'library(string).function(string).callees' with + # 'library(string).function("libloopfunc").callees' + regsub -all "library\\(string\\).function\\(string\\).callees" $probe \ + "library(string).function(\"libfoofunc\").callees" probe + + # Replace 'function(string).callee(string)' with + # 'function("main").callee("ibar")' + regsub -all "function\\(string\\).callee\\(string\\)" $probe \ + "function(\"main\").callee(\"ibar\")" probe + # Replace 'function(string).callees' with 'function("main").callees' + regsub -all "function\\(string\\).callees" $probe \ + "function(\"main\").callees" probe + + # Replace 'callees(number)' with 'callees(1)' + regsub -all "callees\\(number\\)" $probe "callees(1)" probe + # Replace "library(string).function(string)" with "library(string.function("libfoofunc")" regsub -all "library\\(string\\).function\\(string\\)" $probe "library(string).function(\"libfoofunc\")" probe # Replace "library(string).function(number)" with "library(string).function($addr_of_libfoofunc)" -- 2.43.5