microsoft / Microsoft-Performance-Tools-Linux-Android

Linux, Android and Chromium Performance Tools built using the Microsoft Performance Toolkit. Cross-platform .NET Core + WPA GUI
MIT License
316 stars 34 forks source link

Lack of LTTngCds implementation? #104

Closed ami-GS closed 1 year ago

ami-GS commented 1 year ago

Hi Team,

I'm writing MsQuic LTTng trace extension for WPA. https://github.com/microsoft/msquic/pull/3294

I noticed lack of information in LTTngEvent which is actually in trace file. As in image, vpid and vtid are stored in LTTngEvent.StreamDefinedEventContext as “_vpid” and “_vtid”. However there is no cpu_id information which is stored in as stream.packet.context Is this lack of LTTngCds implementation?

One of trace quic.babel.txt The trace file exactly has cpu_id in stream.packet.context image The cpu_id is not stored in LTTngEvent image

ivberg commented 1 year ago

Indeed, it looks like we don’t directly process cpu_id from stream packet context. I am not sure the original reason for that decision but maybe perf so we don't need to read it every time.

However, we do provide the CPU Id information based on reading the cpu from the channel name format – e.g. (channel0_11 is CPU 11). They should be equivalent.

This is available in LTTngContext CurrentCpu. I will add a unit test showing how this is exposed