Hi Carlos, On 14.11.2016 18:23, Carlos O'Donell wrote: > On Mon, Nov 14, 2016 at 11:24 AM, Helge Deller <deller@xxxxxx> wrote: >> What I want to archieve is to modify the return pointer, in order >> to be able to track when the function returns to his caller. >> The kernel ftracer uses this then to generate call stacks and to >> time the function. >> Looking at the above code, it should then be possible for me >> to modify -10(r3), but is there a guarantee that it's always at >> -10(r3) and that r3 is used? >> That's the reason I asked if we could modify mcount to >> give the address (in the stack) of the return pointer, but maybe >> it's just overkill for this use case ? > > Why do you need to modify the value? > > AFAICT ftrace uses these values heuristically e.g. > HAVE_FUNCTION_GRAPH_FP_TEST, HAVE_FUNCTION_GRAPH_RET_ADDR_PTR? > > For example the only uses I see are in ftrace_pop_return_trace() and > they are purely heuristic. Maybe I get you wrong, but do you suggest I don't need to implement it because it's just heuristic ? (I agree, it's not top priority, but nice to have nevertheless) Helge -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html