/* Convert subprogram DIE to trace point */
static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
Dwarf_Addr paddr, bool retprobe,
+ const char *function,
struct probe_trace_point *tp)
{
Dwarf_Addr eaddr, highaddr;
/* Return probe must be on the head of a subprogram */
if (retprobe) {
if (eaddr != paddr) {
- pr_warning("Return probe must be on the head of"
- " a real function.\n");
+ pr_warning("Failed to find \"%s%%return\",\n"
+ " because %s is an inlined function and"
+ " has no return point.\n", function,
+ function);
return -EINVAL;
}
tp->retprobe = true;
{
struct trace_event_finder *tf =
container_of(pf, struct trace_event_finder, pf);
+ struct perf_probe_point *pp = &pf->pev->point;
struct probe_trace_event *tev;
struct perf_probe_arg *args;
int ret, i;
/* Trace point should be converted from subprogram DIE */
ret = convert_to_trace_point(&pf->sp_die, tf->mod, pf->addr,
- pf->pev->point.retprobe, &tev->point);
+ pp->retprobe, pp->function, &tev->point);
if (ret < 0)
return ret;
{
struct available_var_finder *af =
container_of(pf, struct available_var_finder, pf);
+ struct perf_probe_point *pp = &pf->pev->point;
struct variable_list *vl;
Dwarf_Die die_mem;
int ret;
/* Trace point should be converted from subprogram DIE */
ret = convert_to_trace_point(&pf->sp_die, af->mod, pf->addr,
- pf->pev->point.retprobe, &vl->point);
+ pp->retprobe, pp->function, &vl->point);
if (ret < 0)
return ret;