summaryrefslogtreecommitdiffstats
path: root/util.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-08-04 12:35:41 -0400
committerDave Brolley <brolley@redhat.com>2009-08-04 12:35:41 -0400
commitbc9077d171b8250a93a1b5a481e34913e5585dd5 (patch)
tree1fa945c76a66e297e783354ccd7a860aa65d304b /util.cxx
parent3174c3ca37371d738b86d630dc4d8b15104e57d0 (diff)
parent8b095b454b34e88c04592be6c651153f802eced6 (diff)
downloadsystemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.gz
systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.tar.xz
systemtap-steved-bc9077d171b8250a93a1b5a481e34913e5585dd5.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: cache.cxx
Diffstat (limited to 'util.cxx')
-rw-r--r--util.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.cxx b/util.cxx
index a258bf72..495d2f5a 100644
--- a/util.cxx
+++ b/util.cxx
@@ -16,6 +16,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "util.h"
+#include "sys/sdt.h"
#include <stdexcept>
#include <cerrno>
@@ -327,12 +328,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)
@@ -340,6 +343,7 @@ stap_system(const char *command)
else
ret = errno;
}
+ STAP_PROBE1(stap, stap_system__complete, ret);
spawned_pid = 0;
return ret;
}