From ce91eebdf6c262a0235bdd2d3ad3acd0805bf02a Mon Sep 17 00:00:00 2001 From: Kent Sebastian Date: Fri, 31 Jul 2009 14:45:10 -0400 Subject: 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 --- main.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 6a9444de..2c1b1c68 100644 --- a/main.cxx +++ b/main.cxx @@ -21,6 +21,7 @@ #include "coveragedb.h" #include "git_version.h" #include "rpm_finder.h" +#include "sys/sdt.h" #include #include @@ -820,6 +821,8 @@ main (int argc, char * const argv []) // PASS 0: setting up s.verbose = s.perpass_verbose[0]; + STAP_PROBE1(stap, pass0__start, &s); + // For PR1477, we used to override $PATH and $LC_ALL and other stuff // here. We seem to use complete pathnames in @@ -871,12 +874,15 @@ main (int argc, char * const argv []) // and reasonably timely exit. setup_signals(&handle_interrupt); + STAP_PROBE1(stap, pass0__end, &s); + struct tms tms_before; times (& tms_before); struct timeval tv_before; gettimeofday (&tv_before, NULL); // PASS 1a: PARSING USER SCRIPT + STAP_PROBE1(stap, pass1a__start, &s); struct stat user_file_stat; int user_file_stat_rc = -1; @@ -928,6 +934,8 @@ main (int argc, char * const argv []) version_suffixes.push_back (""); // PASS 1b: PARSING LIBRARY SCRIPTS + STAP_PROBE1(stap, pass1b__start, &s); + for (unsigned i=0; i