USING: .NET Core 6 on linux / lttng / babeltrace 2
I use lttng to collect the information about functions which were called while my program is running. I want to understand in which thread function was called.
I run this script
export COMPlus_PerfMapEnabled=1
export COMPlus_EnableEventLog=1
lttng create my-session -o ./my-trace
lttng enable-channel --userspace DotNetCoreChannel
lttng enable-event --userspace --tracepoint DotNETRuntime:EventSource --channel=DotNetCoreChannel --filter "EventSourceName=='Trace'"
lttng start
dotnet run
lttng stop
lttng view
lttng destroy my-session
and get traces like this
[22:05:00.402124499] (+?.?????????) userVM DotNETRuntime:EventSource: { cpu_id = 1 }, { EventID = 1, EventName = "Enter", EventSourceName = "Trace", Payload = "" }
[22:05:00.429636742] (+0.000147700) userVM DotNETRuntime:EventSource: { cpu_id = 1 }, { EventID = 2, EventName = "Leave", EventSourceName = "Trace", Payload = "" }
Firstly I thought that cpu_id means thread number, but when I ran on a bigger program, I got the trace, where Enter and Leave have different cpu_ids, that is why I am looking for the way to get threadIds in trace