Open tmds opened 4 years ago
Can perfcollect
extract the same information from different tools? Could this information be extracted using systemtap
(which can read lttng markers) and/or perf
, both of which can also do kernel tracing without unsupported (on Fedora/RHEL) kernel modules.
@tmds, perfcollect can collect useful data using either perf
, LTTng
, or both. Today, perfcollect
install will attempt to install both, but I do think it's reasonable to modify the logic to check to see if the packages exist, and if not, to emit a warning (presumably at the end of installation), telling the user what was installed and what was not. I'm thinking an "installation summary". If you're interested, feel free to give this a shot - if not, I can see about doing this at some point. I think it would be a nice addition.
@omajid, today perfcollect
does not know how to extract information from tools other than perf
and lttng
, though it would be reasonable to add this functionality. The general strategy that I would use for this is the following:
(a) Modify perfcollect install
to do the right thing on Fedora/RHEL.
(b) Modify perfcollect collect
and perfcollect start/stop
to use systemtap
or otherwise.
(c) When stopping collection, keep the raw trace around and save it in the trace.zip file.
(d) Convert the systemtap
file into the appropriate format so that it can be viewed by the existing tools. For example, lttng
tracepoints collected by systemtap should result in a CTF trace. perf
events should result in a perf.data.txt
file like what we generate with perf script
.
I'm not sure if all of (d) is possible today, but that would be the idea.
If you're interested, feel free to give this a shot - if not, I can see about doing this at some point. I think it would be a nice addition.
I'll look into it, you can assign this issue to me.
Sounds great. Thanks!
@brianrob what is the role of lttng
in perfcollect
?
It is used to configure the events that get published? I guess EventPipe
could be used for that also?
Does it provide stack trace info with the events? I guess sample stack traces come from perf
, and not lttng
?
kmod-lttng-modules
is for events coming from Linux kernel? And the kernel stack info that is found in the trace.zip file also comes from perf
?
@tmds, you're right that lttng
captures events that are published by the runtime and EventSources
. There are no stacks collected as of yet - lttng
only supports stack traces on kernelspace events at this time to my knowledge. kmod-lttng-modules
is for capturing kernel space events. All of the stacks that are captured come from perf
.
@brianrob
We care about being able to provide packages that support performance tracing .NET as part of base RHEL. Since lttng packages are missing, we could use EventPipe to configure the session. I don't know if we could configure EventPipe from the perfcollect
script. Probably it would be a better match to add this to the dotnet trace
tool? Does that make sense? Is it something you have considered?
@brianrob I'm trying to run
perfcollect
on Fedora.It is trying to install some dependencies: https://github.com/microsoft/perfview/blob/cb1943b8ded584e136e140746e5771ca63668c5a/src/perfcollect/perfcollect#L987
The source of packages is an external repository meant for RHEL7: https://packages.efficios.com/repo.files/EfficiOS-RHEL7-x86-64.repo.
On Fedora, I get an error
kmod-lttng-modules
is not compatible with my kernel. Fedora repositories itself actually include all packages, exceptkmod-lttng-modules
. Maybe we can makeperfcollect
still do something meaningful whenkmod-lttng-modules
is not available for the distro?On RHEL8 we are in a similar situation for
kmod-lttng-modules
. RHEL8 repositories include these packages exceptkmod-lttng-modules
andlttng-tools
. Canperfcollect
still be meaningful even in the absence oflttng
data?cc @omajid