[lttng-dev] add cpu_id context to the channel
Yonghong Yan
yanyh15 at gmail.com
Mon Jan 21 16:21:47 EST 2019
Thank you. make sense. I am using Trace Compass XML based approach to
display UST trace records. Using CPU id helps me easier to sort out the
event records in trace compass. I will check out more on trace compass.
Yonghong
On Mon, Jan 21, 2019 at 2:06 PM Mathieu Desnoyers <
mathieu.desnoyers at efficios.com> wrote:
>
> ----- On Jan 21, 2019, at 12:14 PM, Yonghong Yan <yanyh15 at gmail.com>
> wrote:
>
> I saw there is cpu_id field in babeltrace list, how can I add it to the
> context of UST tracepoint events. lttng add-context --list does not show
> that field and I do not see a similar field for the cpu_id.
>
>
> The cpu_id context only exists for the purpose of lttng-ust and
> lttng-modules filtering.
> (e.g. lttng enable-event {-u,-k} --filter '$ctx.cpu_id == 2').
>
> It is not possible to add it as context to the streams, because its
> information would
> be completely redundant with the fact that all the data is written into
> per-cpu buffers,
> and the cpu_id field is available within each packet context (which is
> right after each
> packet header).
>
> You just need to use babeltrace to convert to text, and while doing so, it
> prints a
> "cpu_id = N" context based on the packet_context cpu_id field for each
> event.
>
> Thanks,
>
> Mathieu
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190121/632e6f32/attachment.html>
More information about the lttng-dev
mailing list