diff options
-rw-r--r-- | runtime/ChangeLog | 7 | ||||
-rw-r--r-- | runtime/Doxyfile | 4 | ||||
-rw-r--r-- | runtime/print.c | 1 | ||||
-rw-r--r-- | runtime/probes.c | 30 | ||||
-rw-r--r-- | runtime/stat-common.c | 3 |
5 files changed, 24 insertions, 21 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 61338c35..71871624 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,5 +1,12 @@ 2005-07-01 Martin Hunt <hunt@redhat.com> + * probes.c: Convert all _stp_log() calls to either stp_warn() or + dbug(). + + * print.c: Comment out dbug()s. + + * stat-common.c: Comment out dbug()s. + * map.c (_stp_map_new): Call _stp_error() on a bad map type. Comment out dbug()s. diff --git a/runtime/Doxyfile b/runtime/Doxyfile index 832b34da..7549f2e3 100644 --- a/runtime/Doxyfile +++ b/runtime/Doxyfile @@ -23,7 +23,7 @@ PROJECT_NAME = "SystemTap Runtime" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.61 +PROJECT_NUMBER = 0.62 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -961,7 +961,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = __i386__ NEED_INT64_VALS NEED_STRING_VALS NEED_STAT_VALS KEY1_TYPE_INT64 USE_RET_PROBES +PREDEFINED = __i386__ NEED_INT64_VALS NEED_STRING_VALS NEED_STAT_VALS KEY1_TYPE_INT64 USE_RET_PROBES DEBUG # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/runtime/print.c b/runtime/print.c index 72846a24..3128e866 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -139,7 +139,6 @@ static char *next_fmt(char *fmt, int *num) { char *f = fmt; int in_fmt = 0; - dbug ("next_fmt %s\n", fmt); *num = 0; while (*f) { if (in_fmt) { diff --git a/runtime/probes.c b/runtime/probes.c index 7922c133..bb410915 100644 --- a/runtime/probes.c +++ b/runtime/probes.c @@ -22,7 +22,7 @@ void _stp_unregister_jprobes (struct jprobe *probes, int num_probes) int i; for (i = 0; i < num_probes; i++) unregister_jprobe(&probes[i]); - _stp_log ("All jprobes removed\n"); + dbug("All jprobes removed\n"); } /** Register a group of jprobes. @@ -39,12 +39,11 @@ int _stp_register_jprobes (struct jprobe *probes, int num_probes) for (i = 0; i < num_probes; i++) { addr =_stp_lookup_name((char *)probes[i].kp.addr); if (addr == 0) { - _stp_log ("ERROR: function %s not found!\n", - (char *)probes[i].kp.addr); + _stp_warn("function %s not found!\n", (char *)probes[i].kp.addr); ret = -1; /* FIXME */ goto out; } - _stp_log("inserting jprobe at %s (%p)\n", probes[i].kp.addr, addr); + dbug("inserting jprobe at %s (%p)\n", probes[i].kp.addr, addr); probes[i].kp.addr = (kprobe_opcode_t *)addr; ret = register_jprobe(&probes[i]); if (ret) @@ -52,7 +51,7 @@ int _stp_register_jprobes (struct jprobe *probes, int num_probes) } return 0; out: - _stp_log ("probe module initialization failed. Exiting...\n"); + _stp_warn("probe module initialization failed. Exiting...\n"); _stp_unregister_jprobes(probes, i); return ret; } @@ -67,7 +66,7 @@ void _stp_unregister_kprobes (struct kprobe *probes, int num_probes) int i; for (i = 0; i < num_probes; i++) unregister_kprobe(&probes[i]); - _stp_log ("All kprobes removed\n"); + dbug("All kprobes removed\n"); } @@ -81,7 +80,7 @@ void _stp_unregister_kretprobes (struct kretprobe *probes, int num_probes) int i; for (i = 0; i < num_probes; i++) unregister_kretprobe(&probes[i]); - _stp_log ("All kretprobes removed\n"); + dbug("All return probes removed\n"); } #endif @@ -98,12 +97,11 @@ int _stp_register_kprobes (struct kprobe *probes, int num_probes) for (i = 0; i < num_probes; i++) { addr =_stp_lookup_name((char *)probes[i].addr); if (addr == 0) { - _stp_log ("ERROR: function %s not found!\n", - (char *)probes[i].addr); - ret = -1; /* FIXME */ + _stp_warn("function %s not found!\n", (char *)probes[i].addr); + ret = -1; goto out; } - _stp_log("inserting kprobe at %s (%p)\n", probes[i].addr, addr); + dbug("inserting kprobe at %s (%p)\n", probes[i].addr, addr); probes[i].addr = (kprobe_opcode_t *)addr; ret = register_kprobe(&probes[i]); if (ret) @@ -111,7 +109,7 @@ int _stp_register_kprobes (struct kprobe *probes, int num_probes) } return 0; out: - _stp_log ("probe module initialization failed. Exiting...\n"); + _stp_warn("probe module initialization failed. Exiting...\n"); _stp_unregister_kprobes(probes, i); return ret; } @@ -130,12 +128,12 @@ int _stp_register_kretprobes (struct kretprobe *probes, int num_probes) for (i = 0; i < num_probes; i++) { addr =_stp_lookup_name((char *)probes[i].kp.addr); if (addr == 0) { - _stp_log ("ERROR: function %s not found!\n", - (char *)probes[i].kp.addr); + _stp_warn("function %s not found!\n", + (char *)probes[i].kp.addr); ret = -1; /* FIXME */ goto out; } - _stp_log("inserting kretprobe at %s (%p)\n", probes[i].kp.addr, addr); + dbug("inserting kretprobe at %s (%p)\n", probes[i].kp.addr, addr); probes[i].kp.addr = (kprobe_opcode_t *)addr; ret = register_kretprobe(&probes[i]); if (ret) @@ -143,7 +141,7 @@ int _stp_register_kretprobes (struct kretprobe *probes, int num_probes) } return 0; out: - _stp_log ("probe module initialization failed. Exiting...\n"); + _stp_warn("probe module initialization failed. Exiting...\n"); _stp_unregister_kretprobes(probes, i); return ret; } diff --git a/runtime/stat-common.c b/runtime/stat-common.c index d136ec99..ff19662b 100644 --- a/runtime/stat-common.c +++ b/runtime/stat-common.c @@ -116,7 +116,7 @@ static void _stp_stat_print_histogram (Stat st, stat *sd) val_space = needed_space (st->hist_start + st->hist_int * (st->hist_buckets - 1)); else val_space = needed_space (1 << (st->hist_buckets - 1)); - dbug ("max=%lld scale=%d val_space=%d\n", max, scale, val_space); + //dbug ("max=%lld scale=%d val_space=%d\n", max, scale, val_space); /* print header */ j = 0; @@ -157,7 +157,6 @@ static void _stp_stat_print_histogram (Stat st, stat *sd) static void _stp_stat_print_valtype (char *fmt, Stat st, struct stat_data *sd, int cpu) { - dbug ("fmt=%c\n", *fmt); switch (*fmt) { case 'C': _stp_printf("%lld", sd->count); |