diff options
author | Kent Sebastian <ksebasti@redhat.com> | 2009-07-31 14:45:10 -0400 |
---|---|---|
committer | Kent Sebastian <ksebasti@redhat.com> | 2009-07-31 14:45:10 -0400 |
commit | ce91eebdf6c262a0235bdd2d3ad3acd0805bf02a (patch) | |
tree | 7ca9eef90de8b29a1a977530d623ec7240740db5 /util.cxx | |
parent | f1312b2c2bc1ec7b0475a251f27a2f75779f4ccb (diff) | |
download | systemtap-steved-ce91eebdf6c262a0235bdd2d3ad3acd0805bf02a.tar.gz systemtap-steved-ce91eebdf6c262a0235bdd2d3ad3acd0805bf02a.tar.xz systemtap-steved-ce91eebdf6c262a0235bdd2d3ad3acd0805bf02a.zip |
PR10204: Place userspace markers in systemtap itself
* cache.cxx (add_to_cache,clean_cache): add static markers
* main.cxx (main): likewise
* runtime/staprun/common.c (send_request): likewise
* runtime/staprun/mainloop.c (stp_main_loop): likewise
* runtime/staprun/staprun.c (remove_module): likewise
* runtime/staprun/staprun.h: include sdt.h
* runtime/staprun/staprun_funcs.c (insert_module): likewise
* util.cxx (stap_system): likewise
* tapset/stap_staticmarkers.stp: new file
Diffstat (limited to 'util.cxx')
-rw-r--r-- | util.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -16,6 +16,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "util.h" +#include "sys/sdt.h" #include <stdexcept> #include <cerrno> @@ -303,12 +304,14 @@ static pid_t spawned_pid = 0; int stap_system(const char *command) { + STAP_PROBE1(stap, stap_system__start, command); const char * argv[] = { "sh", "-c", command, NULL }; int ret, status; spawned_pid = 0; ret = posix_spawn(&spawned_pid, "/bin/sh", NULL, NULL, const_cast<char **>(argv), environ); + STAP_PROBE2(stap, stap_system__spawn, ret, spawned_pid); if (ret == 0) { if (waitpid(spawned_pid, &status, 0) == spawned_pid) @@ -316,6 +319,7 @@ stap_system(const char *command) else ret = errno; } + STAP_PROBE1(stap, stap_system__complete, ret); spawned_pid = 0; return ret; } |