Merge branch 'perf/urgent' into perf/core
Merge reason: Pick up pending fixes before applying dependent new changes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -1539,6 +1539,7 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
|
||||
goto error;
|
||||
}
|
||||
tev->point.offset = pev->point.offset;
|
||||
tev->point.retprobe = pev->point.retprobe;
|
||||
tev->nargs = pev->nargs;
|
||||
if (tev->nargs) {
|
||||
tev->args = zalloc(sizeof(struct probe_trace_arg)
|
||||
|
@@ -686,6 +686,25 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
|
||||
char buf[32], *ptr;
|
||||
int ret, nscopes;
|
||||
|
||||
if (!is_c_varname(pf->pvar->var)) {
|
||||
/* Copy raw parameters */
|
||||
pf->tvar->value = strdup(pf->pvar->var);
|
||||
if (pf->tvar->value == NULL)
|
||||
return -ENOMEM;
|
||||
if (pf->pvar->type) {
|
||||
pf->tvar->type = strdup(pf->pvar->type);
|
||||
if (pf->tvar->type == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (pf->pvar->name) {
|
||||
pf->tvar->name = strdup(pf->pvar->name);
|
||||
if (pf->tvar->name == NULL)
|
||||
return -ENOMEM;
|
||||
} else
|
||||
pf->tvar->name = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pf->pvar->name)
|
||||
pf->tvar->name = strdup(pf->pvar->name);
|
||||
else {
|
||||
@@ -700,19 +719,6 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf)
|
||||
if (pf->tvar->name == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!is_c_varname(pf->pvar->var)) {
|
||||
/* Copy raw parameters */
|
||||
pf->tvar->value = strdup(pf->pvar->var);
|
||||
if (pf->tvar->value == NULL)
|
||||
return -ENOMEM;
|
||||
if (pf->pvar->type) {
|
||||
pf->tvar->type = strdup(pf->pvar->type);
|
||||
if (pf->tvar->type == NULL)
|
||||
return -ENOMEM;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
pr_debug("Searching '%s' variable in context.\n",
|
||||
pf->pvar->var);
|
||||
/* Search child die for local variables and parameters. */
|
||||
@@ -783,6 +789,16 @@ static int convert_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf)
|
||||
/* This function has no name. */
|
||||
tev->point.offset = (unsigned long)pf->addr;
|
||||
|
||||
/* Return probe must be on the head of a subprogram */
|
||||
if (pf->pev->point.retprobe) {
|
||||
if (tev->point.offset != 0) {
|
||||
pr_warning("Return probe must be on the head of"
|
||||
" a real function\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
tev->point.retprobe = true;
|
||||
}
|
||||
|
||||
pr_debug("Probe point found: %s+%lu\n", tev->point.symbol,
|
||||
tev->point.offset);
|
||||
|
||||
|
Reference in New Issue
Block a user