[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tracecompass-dev] How to use Trace Compass with perf record/trace
|
Further research:
https://lwn.net/Articles/607722/
You seem to be correct with your approach of "perf data convert
--to-ctf=./ctf-data/
I'm looking at perf's source code...
http://lxr.free-electrons.com/source/tools/perf/builtin-data.c
#ifndef HAVE_LIBBABELTRACE_SUPPORT
73 <http://lxr.free-electrons.com/source/tools/perf/builtin-data.c#L73> pr_err <http://lxr.free-electrons.com/ident?i=pr_err>(/"No conversion support compiled in.\n"/);
74 <http://lxr.free-electrons.com/source/tools/perf/builtin-data.c#L74> return -1;
75 <http://lxr.free-electrons.com/source/tools/perf/builtin-data.c#L75> #endif
It looks like we need babeltrace and then to recompile perf...
Here's a guide, but I have not tried any of it. Once again, this would
be better answered by LKML.
http://lxr.free-electrons.com/source/tools/perf/builtin-data.c
Hope this helps!
Matthew
On 17-03-06 12:33 PM, Stefano Doni wrote:
> Thank you Matthew,
>
>
> Yes I can run perf record, but I was not aware of the python CTF
> conversion script.
>
> Where can I get it?
>
>
> Thanks!
>
> Il 06/mar/2017 3:35 PM, "Matthew Khouzam"
> <matthew.khouzam@xxxxxxxxxxxx <mailto:matthew.khouzam@xxxxxxxxxxxx>>
> ha scritto:
>
> Hi,
>
> I have to warn, I am far from an expert on Perf, to know who to get it
> working, you're better off asking on the LKML.
>
> Is your perf record command working?
> (https://lists.gt.net/linux/kernel/1972041
> <https://lists.gt.net/linux/kernel/1972041>)
>
> The CTF output will give raw events, the aggregate data is
> generated by
> trace compass itself.
>
> I hope this helps.
>
> Matthew.
>
>
> On 17-03-02 11:50 AM, Stefano Doni wrote:
> > Hi,
> >
> >
> > I'm to to Trace Compass and I'm trying to use it to analyze traces
> > collected on standard Linux kernel using perf. I'm particularly
> > interested in visualizing the time each application thread spends in
> > userspace, syscalls and when scheduled out of CPUs.
> >
> > The first attempt I made was using perf record and then
> converting to
> > CTF, however it seems Ubuntu did not compile CTF data conversion
> into
> > perf:
> >
> > $ sudo perf data convert
> > No conversion support compiled in.
> >
> > Do you know if there are other distros that have included CTF
> > conversion capabilities in perf packages?
> >
> >
> > The second question is related to importing text files into Trace
> > Compass. I have a number of perf trace text outputs that I collected
> > from live production systems that I would like to analyze. I've seen
> > that Trace Compass has the capability to import arbitrary text
> files,
> > however it is not clear from the guide what are the steps needed to
> > actually import the file and which kind of analysis are supported.
> >
> > The perf trace output has the following format:
> >
> > 5295.425 ( 2.302 ms): recvfrom(fd: 459<socket:[3282172773]>, ubuf:
> > 0x7feedeff4e90, size: 8 ) = 8
> > 5295.586 ( 0.034 ms): recvfrom(fd: 459<socket:[3282172773]>, ubuf:
> > 0x7feedeff4e90, size: 4 ) = 4
> > 5297.259 ( 0.069 ms): write(fd: 468<socket:[3282201926]>, buf:
> > 0x7fedd62c1f68, count: 1954 ) = 1954
> > 5329.828 (32.545 ms): read(fd: 468<socket:[3282201926]>, buf:
> > 0x7feedeff0900, count: 16384 ) = 16384
> > 5329.905 ( 0.018 ms): read(fd: 468<socket:[3282201926]>, buf:
> > 0x7feedeff0900, count: 16384 ) = 16384
> > 5329.961 ( 0.022 ms): read(fd: 468<socket:[3282201926]>, buf:
> > 0x7feedeff0900, count: 16384 ) = 16384
> > 5330.007 ( 0.018 ms): read(fd: 468<socket:[3282201926]>, buf:
> > 0x7feedeff0900, count: 16384 ) = 16384
> > 5330.055 ( 0.017 ms): read(fd: 468<socket:[3282201926]>, buf:
> > 0x7feedeff0900, count: 16384 ) = 13726
> >
> > Interesting bits: first field is timestamp, syscall duration between
> > brackets and then we have the syscall name. Here I have traced a
> > single thread, but if a pid is traced we also have the thread id
> (tid)
> > in the output.
> >
> >
> > Is it possible to import a perf trace output and analyze it to see
> > different threads over time with syscall durations, similar to the
> > Control Flow analysis?
> >
> >
> > Thanks a lot in advance!
> >
> >
> > _______________________________________________
> > tracecompass-dev mailing list
> > tracecompass-dev@xxxxxxxxxxx <mailto:tracecompass-dev@xxxxxxxxxxx>
> > To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/tracecompass-dev
> <https://dev.eclipse.org/mailman/listinfo/tracecompass-dev>
>
> _______________________________________________
> tracecompass-dev mailing list
> tracecompass-dev@xxxxxxxxxxx <mailto:tracecompass-dev@xxxxxxxxxxx>
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tracecompass-dev
> <https://dev.eclipse.org/mailman/listinfo/tracecompass-dev>
>
>
>
> _______________________________________________
> tracecompass-dev mailing list
> tracecompass-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tracecompass-dev