On Mon, 2015-01-12 at 10:58 -0700, David Ahern wrote:
> On 1/12/15 10:22 AM, Carl Love wrote:
> > Ah, this is the ioctl patch you had mentioned you mentioned previously.
> > I hadn't found the patch before. Yes, this looks like it would work. I
> > will see if I can get a prototype working with this patch. Thanks.
> >
>
> If you need to shove samples into perf (versus mmap updates) I suspect
> the prctl system call will have way to much overhead. In that case
> perhaps processes could export a shared memory buffer that a perf
> session could attach -- another aux buffer similar to what itrace needs.
> But then that brings in the perf_clock issue; samples would need to have
> the same time basis as kernel generated samples.
>
I have the kernel patch by Pawel working to send the source file name,
the code address and the code size to perf and insert a new record into
the perf.data file as a uevent. In the perf code, I have added code in
file util/session.c, perf_session__deliver_event() to call a function to
process the new event data.
I am trying to start with just getting the samples mapped to the elf
file. I will try to implement mapping the samples to a specific source
code line later.
My thought is I need to take the data and create a "fake" elf file entry
with the file name, start address and code size so the will be able to
map sample addresses to the elf file for the java method. I am
struggling to understand code flow for the perf record, specifically
when the elf files get read, mapping a sample to an elf file, etc. It
is not clear to me how I would go about creating the fake elf file and
how to make it visible for use by the perf record tool. Any pointers
and guidance would be appreciated. Thanks.
Carl Love
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html