From cda141c254eb1862cecb9d54383d6f69cb01c359 Mon Sep 17 00:00:00 2001 From: Serguei Makarov Date: Fri, 21 Sep 2012 16:05:23 -0400 Subject: [PATCH] common_probe_context cleanup: make probe_type an enum --- runtime/common_probe_context.h | 4 ++-- runtime/runtime_defines.h | 38 ++++++++++++++++++---------------- runtime/stack.c | 16 +++++++------- tapset-been.cxx | 2 +- tapset-itrace.cxx | 2 +- tapset-mark.cxx | 2 +- tapset-netfilter.cxx | 2 +- tapset-perfmon.cxx | 2 +- tapset-procfs.cxx | 4 ++-- tapset-timers.cxx | 6 +++--- tapset-utrace.cxx | 4 ++-- tapset/context.stp | 34 +++++++++++++++--------------- tapset/linux/context.stp | 4 ++-- tapsets.cxx | 20 +++++++++--------- 14 files changed, 71 insertions(+), 69 deletions(-) diff --git a/runtime/common_probe_context.h b/runtime/common_probe_context.h index c2f20c582..d9fd03b02 100644 --- a/runtime/common_probe_context.h +++ b/runtime/common_probe_context.h @@ -23,11 +23,11 @@ const char *probe_point; const char *probe_name; #endif -/* The kind of probe this is. One of the _STP_PROBE_HANDLER_ constants. +/* The kind of probe this is. One of the stp_probe_type constants. Used to determined what other fields are setup and how. Often the probe context fields depend on how the probe handler is triggered and what information it gets passed. */ -int probe_type; +enum stp_probe_type probe_type; /* Common status flags of probe. */ unsigned user_mode_p:1; diff --git a/runtime/runtime_defines.h b/runtime/runtime_defines.h index 1f680e507..676cf5b29 100644 --- a/runtime/runtime_defines.h +++ b/runtime/runtime_defines.h @@ -69,43 +69,45 @@ typedef char string_t[MAXSTRINGLEN]; #define STP_OVERLOAD #endif -/* Defines for CONTEXT probe_type. */ +/* Used for CONTEXT probe_type. */ +enum stp_probe_type { /* begin, end or never probe, triggered by stap module itself. */ -#define _STP_PROBE_HANDLER_BEEN 1 + stp_probe_type_been, /* user space instruction probe, trigger by utrace signal report. */ -#define _STP_PROBE_HANDLER_ITRACE 2 + stp_probe_type_itrace, /* kernel marker probe, triggered by old marker_probe (removed in 2.6.32). */ -#define _STP_PROBE_HANDLER_MARKER 3 + stp_probe_type_marker, /* perf event probe, triggered by perf event counter. Note that although this is defined in tapset-perfmon.cxx, this has nothing to do with the (old and now removed) perfmon probes. */ -#define _STP_PROBE_HANDLER_PERF 4 + stp_probe_type_perf, /* read or write of stap module proc file. Triggers on manipulation of the /proc/systemtap/MODNAME created through a procfs probe. */ -#define _STP_PROBE_HANDLER_PROCFS 5 + stp_probe_type_procfs, /* timer probe, triggered by standard kernel init_timer interface. */ -#define _STP_PROBE_HANDLER_TIMER 6 + stp_probe_type_timer, /* high resolution timer probes, triggered by hrtimer firing. */ -#define _STP_PROBE_HANDLER_HRTIMER 7 + stp_probe_type_hrtimer, /* profile timer probe, triggered by kernel profile timer (either in kernel or user space). */ -#define _STP_PROBE_HANDLER_PROFILE_TIMER 8 + stp_probe_type_profile_timer, /* utrace thread start/end probe, triggered by utrace quiesce event for associated thread. */ -#define _STP_PROBE_HANDLER_UTRACE 9 + stp_probe_type_utrace, /* utrace syscall enter/exit probe, triggered by utrace syscall event. */ -#define _STP_PROBE_HANDLER_UTRACE_SYSCALL 10 + stp_probe_type_utrace_syscall, /* kprobe event, triggered for dwarf or dwarfless kprobes. */ -#define _STP_PROBE_HANDLER_KPROBE 11 + stp_probe_type_kprobe, /* kretprobe event, triggered for dwarf or dwarfless kretprobes. */ -#define _STP_PROBE_HANDLER_KRETPROBE 12 + stp_probe_type_kretprobe, /* uprobe event, triggered by hitting a uprobe. */ -#define _STP_PROBE_HANDLER_UPROBE 13 + stp_probe_type_uprobe, /* uretprobe event, triggered by hitting a uretprobe. */ -#define _STP_PROBE_HANDLER_URETPROBE 14 + stp_probe_type_uretprobe, /* hardware data watch break point, triggered by kernel data read/write. */ -#define _STP_PROBE_HANDLER_HWBKPT 15 + stp_probe_type_hwbkpt, /* kernel tracepoint probe, triggered by tracepoint event call. */ -#define _STP_PROBE_HANDLER_TRACEPOINT 16 + stp_probe_type_tracepoint, /* netfilter probe, triggered on network trafic */ -#define _STP_PROBE_HANDLER_NETFILTER 17 + stp_probe_type_netfilter, +}; diff --git a/runtime/stack.c b/runtime/stack.c index 2dc53066d..682aee332 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -280,7 +280,7 @@ static unsigned long _stp_stack_unwind_one_kernel(struct context *c, unsigned de * _stp_stack_kernel_print() and do their own * tokenization of the result. */ return 0; - } else if (c->probe_type == _STP_PROBE_HANDLER_KRETPROBE + } else if (c->probe_type == stp_probe_type_kretprobe && c->ips.krp.pi) { return (unsigned long)_stp_ret_addr_r(c->ips.krp.pi); } else { @@ -403,7 +403,7 @@ static void _stp_stack_kernel_print(struct context *c, int sym_flags) } /* print the current address */ - if (c->probe_type == _STP_PROBE_HANDLER_KRETPROBE && c->ips.krp.pi + if (c->probe_type == stp_probe_type_kretprobe && c->ips.krp.pi && (sym_flags & _STP_SYM_FULL) == _STP_SYM_FULL) { _stp_print("Returning from: "); _stp_print_addr((unsigned long)_stp_probe_addr_r(c->ips.krp.pi), @@ -441,10 +441,10 @@ static unsigned long _stp_stack_unwind_one_user(struct context *c, unsigned dept unsigned long maybe_pc; #endif - if (c->probe_type == _STP_PROBE_HANDLER_URETPROBE) + if (c->probe_type == stp_probe_type_uretprobe) ri = c->ips.ri; #ifdef STAPCONF_UPROBE_GET_PC - else if (c->probe_type == _STP_PROBE_HANDLER_UPROBE) + else if (c->probe_type == stp_probe_type_uprobe) ri = GET_PC_URETPROBE_NONE; #endif @@ -460,7 +460,7 @@ static unsigned long _stp_stack_unwind_one_user(struct context *c, unsigned dept dbug_unwind(1, "STARTING user unwind\n"); #ifdef STAPCONF_UPROBE_GET_PC - if (c->probe_type == _STP_PROBE_HANDLER_URETPROBE && ri) { + if (c->probe_type == stp_probe_type_uretprobe && ri) { return ri->ret_addr; } else { return REG_IP(regs); @@ -551,10 +551,10 @@ static void _stp_stack_user_print(struct context *c, int sym_flags) struct uretprobe_instance *ri = NULL; unsigned n; unsigned long l; - if (c->probe_type == _STP_PROBE_HANDLER_URETPROBE) + if (c->probe_type == stp_probe_type_uretprobe) ri = c->ips.ri; #ifdef STAPCONF_UPROBE_GET_PC - else if (c->probe_type == _STP_PROBE_HANDLER_UPROBE) + else if (c->probe_type == stp_probe_type_uprobe) ri = GET_PC_URETPROBE_NONE; #endif @@ -571,7 +571,7 @@ static void _stp_stack_user_print(struct context *c, int sym_flags) /* print the current address */ #ifdef STAPCONF_UPROBE_GET_PC - if (c->probe_type == _STP_PROBE_HANDLER_URETPROBE && ri) { + if (c->probe_type == stp_probe_type_uretprobe && ri) { if ((sym_flags & _STP_SYM_FULL) == _STP_SYM_FULL) { _stp_print("Returning from: "); /* ... otherwise this dereference fails */ diff --git a/tapset-been.cxx b/tapset-been.cxx index 678244549..f6645fd17 100644 --- a/tapset-been.cxx +++ b/tapset-been.cxx @@ -140,7 +140,7 @@ be_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_be_probe (struct stap_be_probe *stp) {"; s.op->indent(1); common_probe_entryfn_prologue (s, "stp->state", "stp->probe", - "_STP_PROBE_HANDLER_BEEN", false); + "stp_probe_type_been", false); s.op->newline() << "(*stp->probe->ph) (c);"; common_probe_entryfn_epilogue (s.op, false, s.suppress_handler_errors); s.op->newline(-1) << "}"; diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx index 18a0af99f..6cd56f09f 100644 --- a/tapset-itrace.cxx +++ b/tapset-itrace.cxx @@ -191,7 +191,7 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->indent(1); common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "p->probe", - "_STP_PROBE_HANDLER_ITRACE"); + "stp_probe_type_itrace"); s.op->newline() << "c->uregs = regs;"; s.op->newline() << "c->user_mode_p = 1;"; diff --git a/tapset-mark.cxx b/tapset-mark.cxx index 98cd5bfbe..b1411f184 100644 --- a/tapset-mark.cxx +++ b/tapset-mark.cxx @@ -512,7 +512,7 @@ mark_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "static void enter_marker_probe (void *probe_data, void *call_data, const char *fmt, va_list *args) {"; s.op->newline(1) << "struct stap_marker_probe *smp = (struct stap_marker_probe *)probe_data;"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "smp->probe", - "_STP_PROBE_HANDLER_MARKER"); + "stp_probe_type_marker"); s.op->newline() << "c->ips.kmark.marker_name = smp->name;"; s.op->newline() << "c->ips.kmark.marker_format = smp->format;"; s.op->newline() << "c->ips.kmark.mark_va_list = args;"; diff --git a/tapset-netfilter.cxx b/tapset-netfilter.cxx index 85541fad2..a1996a196 100644 --- a/tapset-netfilter.cxx +++ b/tapset-netfilter.cxx @@ -281,7 +281,7 @@ netfilter_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(1) << "struct stap_probe * const stp = & stap_probes[" << np->session_index << "];"; s.op->newline() << "int nf_verdict = NF_ACCEPT;"; // default NF_ACCEPT, to be used by $verdict context var common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "stp", - "_STP_PROBE_HANDLER_NETFILTER", + "stp_probe_type_netfilter", false); // Copy or pretend-to-touch each incoming parameter. diff --git a/tapset-perfmon.cxx b/tapset-perfmon.cxx index ab4f76fe0..61b73bec8 100644 --- a/tapset-perfmon.cxx +++ b/tapset-perfmon.cxx @@ -148,7 +148,7 @@ perf_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "{"; s.op->newline(1) << "struct stap_perf_probe* stp = & stap_perf_probes [i];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "stp->probe", - "_STP_PROBE_HANDLER_PERF"); + "stp_probe_type_perf"); s.op->newline() << "if (user_mode(regs)) {"; s.op->newline(1)<< "c->user_mode_p = 1;"; s.op->newline() << "c->uregs = regs;"; diff --git a/tapset-procfs.cxx b/tapset-procfs.cxx index e14c66b19..913caf15e 100644 --- a/tapset-procfs.cxx +++ b/tapset-procfs.cxx @@ -250,7 +250,7 @@ procfs_derived_probe_group::emit_module_decls (systemtap_session& s) common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "spp->read_probe", - "_STP_PROBE_HANDLER_PROCFS"); + "stp_probe_type_procfs"); s.op->newline() << "pdata.buffer = spp->buffer;"; s.op->newline() << "pdata.bufsize = spp->bufsize;"; @@ -296,7 +296,7 @@ procfs_derived_probe_group::emit_module_decls (systemtap_session& s) common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "spp->write_probe", - "_STP_PROBE_HANDLER_PROCFS"); + "stp_probe_type_procfs"); // We've got 2 problems here. The data count could be greater // than MAXSTRINGLEN or greater than the bufsize (if the same diff --git a/tapset-timers.cxx b/tapset-timers.cxx index 0e30523cf..a63ae5cda 100644 --- a/tapset-timers.cxx +++ b/tapset-timers.cxx @@ -129,7 +129,7 @@ timer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(-1) << "{"; s.op->indent(1); common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "stp->probe", - "_STP_PROBE_HANDLER_TIMER"); + "stp_probe_type_timer"); s.op->newline() << "(*stp->probe->ph) (c);"; common_probe_entryfn_epilogue (s.op, true, s.suppress_handler_errors); s.op->newline(-1) << "}"; @@ -316,7 +316,7 @@ hrtimer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "{"; s.op->indent(1); common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "stp->probe", - "_STP_PROBE_HANDLER_HRTIMER"); + "stp_probe_type_hrtimer"); s.op->newline() << "(*stp->probe->ph) (c);"; common_probe_entryfn_epilogue (s.op, true, s.suppress_handler_errors); s.op->newline(-1) << "}"; @@ -432,7 +432,7 @@ profile_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(1) << "struct stap_probe * probe = " << common_probe_init (probes[0]) << ";"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "probe", - "_STP_PROBE_HANDLER_PROFILE_TIMER"); + "stp_probe_type_profile_timer"); // Timer interrupts save all registers, so if the interrupt happened // in user space we can rely on it being the full user pt_regs. s.op->newline() << "if (user_mode(regs)) {"; diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx index 816d695c6..5d6ff1ba0 100644 --- a/tapset-utrace.cxx +++ b/tapset-utrace.cxx @@ -833,7 +833,7 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->indent(1); common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "p->probe", - "_STP_PROBE_HANDLER_UTRACE"); + "stp_probe_type_utrace"); // call probe function s.op->newline() << "(*p->probe->ph) (c);"; @@ -860,7 +860,7 @@ utrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "struct stap_utrace_probe *p = (struct stap_utrace_probe *)engine->data;"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "p->probe", - "_STP_PROBE_HANDLER_UTRACE_SYSCALL"); + "stp_probe_type_utrace_syscall"); s.op->newline() << "c->uregs = regs;"; s.op->newline() << "c->user_mode_p = 1;"; diff --git a/tapset/context.stp b/tapset/context.stp index d849b325e..7d3189cf3 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -39,55 +39,55 @@ function probe_type:string() %{ /* pure */ /* unprivileged */ switch (CONTEXT->probe_type) { - case _STP_PROBE_HANDLER_BEEN: + case stp_probe_type_been: strlcpy (STAP_RETVALUE, "begin_end", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_ITRACE: + case stp_probe_type_itrace: strlcpy (STAP_RETVALUE, "itrace", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_MARKER: + case stp_probe_type_marker: strlcpy (STAP_RETVALUE, "kernel_marker", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_PERF: + case stp_probe_type_perf: strlcpy (STAP_RETVALUE, "perf_event", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_PROCFS: + case stp_probe_type_procfs: strlcpy (STAP_RETVALUE, "procfs", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_TIMER: + case stp_probe_type_timer: strlcpy (STAP_RETVALUE, "timer", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_HRTIMER: + case stp_probe_type_hrtimer: strlcpy (STAP_RETVALUE, "hrtimer", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_PROFILE_TIMER: + case stp_probe_type_profile_timer: strlcpy (STAP_RETVALUE, "profile_timer", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_NETFILTER: + case stp_probe_type_netfilter: strlcpy (STAP_RETVALUE, "netfilter", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_UTRACE: + case stp_probe_type_utrace: strlcpy (STAP_RETVALUE, "utrace", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_UTRACE_SYSCALL: + case stp_probe_type_utrace_syscall: strlcpy (STAP_RETVALUE, "utrace_syscall", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_KPROBE: + case stp_probe_type_kprobe: strlcpy (STAP_RETVALUE, "kprobe", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_KRETPROBE: + case stp_probe_type_kretprobe: strlcpy (STAP_RETVALUE, "kretprobe", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_UPROBE: + case stp_probe_type_uprobe: strlcpy (STAP_RETVALUE, "uprobe", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_URETPROBE: + case stp_probe_type_uretprobe: strlcpy (STAP_RETVALUE, "uretprobe", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_HWBKPT: + case stp_probe_type_hwbkpt: strlcpy (STAP_RETVALUE, "hardware_data_breakpoint", MAXSTRINGLEN); break; - case _STP_PROBE_HANDLER_TRACEPOINT: + case stp_probe_type_tracepoint: strlcpy (STAP_RETVALUE, "kernel_tracepoint", MAXSTRINGLEN); break; default: diff --git a/tapset/linux/context.stp b/tapset/linux/context.stp index a336ba389..551d009cb 100644 --- a/tapset/linux/context.stp +++ b/tapset/linux/context.stp @@ -242,8 +242,8 @@ function user_mode:long () */ function is_return:long () %{ /* pure */ - if (CONTEXT->probe_type == _STP_PROBE_HANDLER_KRETPROBE - || CONTEXT->probe_type == _STP_PROBE_HANDLER_URETPROBE) + if (CONTEXT->probe_type == stp_probe_type_kretprobe + || CONTEXT->probe_type == stp_probe_handler_uretprobe) STAP_RETVALUE = 1; else STAP_RETVALUE = 0; diff --git a/tapsets.cxx b/tapsets.cxx index cd21f4101..65e6974d2 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4829,7 +4829,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) // XXX: it would be nice to give a more verbose error though; BUG_ON later? s.op->line() << "];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sdp->probe", - "_STP_PROBE_HANDLER_KPROBE"); + "stp_probe_type_kprobe"); s.op->newline() << "c->kregs = regs;"; // Make it look like the IP is set as it wouldn't have been replaced @@ -4866,7 +4866,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "if (sp) {"; s.op->indent(1); common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sp", - "_STP_PROBE_HANDLER_KRETPROBE"); + "stp_probe_type_kretprobe"); s.op->newline() << "c->kregs = regs;"; // for assisting runtime's backtrace logic and accessing kretprobe data packets @@ -7397,7 +7397,7 @@ uprobe_derived_probe_group::emit_module_utrace_decls (systemtap_session& s) s.op->newline(1) << "struct stap_uprobe *sup = container_of(inst, struct stap_uprobe, up);"; s.op->newline() << "const struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sups->probe", - "_STP_PROBE_HANDLER_UPROBE"); + "stp_probe_type_uprobe"); s.op->newline() << "if (sup->spec_index < 0 || " << "sup->spec_index >= " << probes.size() << ") {"; s.op->newline(1) << "_stp_error (\"bad spec_index %d (max " << probes.size() @@ -7426,7 +7426,7 @@ uprobe_derived_probe_group::emit_module_utrace_decls (systemtap_session& s) s.op->newline(1) << "struct stap_uprobe *sup = container_of(inst->rp, struct stap_uprobe, urp);"; s.op->newline() << "const struct stap_uprobe_spec *sups = &stap_uprobe_specs [sup->spec_index];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sups->probe", - "_STP_PROBE_HANDLER_URETPROBE"); + "stp_probe_type_uretprobe"); s.op->newline() << "c->ips.ri = inst;"; s.op->newline() << "if (sup->spec_index < 0 || " << "sup->spec_index >= " << probes.size() << ") {"; @@ -7581,7 +7581,7 @@ uprobe_derived_probe_group::emit_module_inode_decls (systemtap_session& s) s.op->newline(1) << "struct stapiu_consumer *sup = " << "container_of(inst, struct stapiu_consumer, consumer);"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sup->probe", - "_STP_PROBE_HANDLER_UPROBE"); + "stp_probe_type_uprobe"); s.op->newline() << "c->uregs = regs;"; s.op->newline() << "c->user_mode_p = 1;"; // Make it look like the IP is set as it would in the actual user @@ -7745,7 +7745,7 @@ uprobe_derived_probe_group::emit_module_dyninst_decls (systemtap_session& s) s.op->newline(1) << "struct stapdu_consumer *sup = " << "&stap_dyninst_uprobe_consumers[index];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sup->probe", - "_STP_PROBE_HANDLER_UPROBE"); + "stp_probe_type_uprobe"); s.op->newline() << "c->uregs = regs;"; s.op->newline() << "c->user_mode_p = 1;"; // XXX: once we have regs, check how dyninst sets the IP @@ -8114,7 +8114,7 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s) // XXX: it would be nice to give a more verbose error though; BUG_ON later? s.op->line() << "];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sdp->probe", - "_STP_PROBE_HANDLER_KPROBE"); + "stp_probe_type_kprobe"); s.op->newline() << "c->kregs = regs;"; // Make it look like the IP is set as it wouldn't have been replaced @@ -8148,7 +8148,7 @@ kprobe_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->line() << "];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sdp->probe", - "_STP_PROBE_HANDLER_KRETPROBE"); + "stp_probe_type_kretprobe"); s.op->newline() << "c->kregs = regs;"; s.op->newline() << "c->ips.krp.pi = inst;"; // for assisting runtime's backtrace logic @@ -8754,7 +8754,7 @@ hwbkpt_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "if (bp->attr.bp_addr==hp->bp_addr && bp->attr.bp_type==hp->bp_type && bp->attr.bp_len==hp->bp_len) {"; s.op->newline(1) << "struct stap_hwbkpt_probe *sdp = &stap_hwbkpt_probes[i];"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "sdp->probe", - "_STP_PROBE_HANDLER_HWBKPT"); + "stp_probe_type_hwbkpt"); s.op->newline() << "if (user_mode(regs)) {"; s.op->newline(1)<< "c->user_mode_p = 1;"; s.op->newline() << "c->uregs = regs;"; @@ -9515,7 +9515,7 @@ tracepoint_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(1) << "struct stap_probe * const probe = " << common_probe_init (p) << ";"; common_probe_entryfn_prologue (s, "STAP_SESSION_RUNNING", "probe", - "_STP_PROBE_HANDLER_TRACEPOINT"); + "stp_probe_type_tracepoint"); s.op->newline() << "c->ips.tracepoint_name = " << lex_cast_qstring (p->tracepoint_name) << ";"; -- 2.43.5