<div dir="ltr">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. <div><br></div><div>Yonghong<br><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 21, 2019 at 2:06 PM Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div><br></div><div><span id="gmail-m_-6511454066164686156zwchr">----- On Jan 21, 2019, at 12:14 PM, Yonghong Yan <<a href="mailto:yanyh15@gmail.com" target="_blank">yanyh15@gmail.com</a>> wrote:<br></span></div><div><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div dir="ltr">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. </div></div></blockquote><div><br></div><div>The cpu_id context only exists for the purpose of lttng-ust and lttng-modules filtering.<br></div><div>(e.g. lttng enable-event {-u,-k} --filter '$ctx.cpu_id == 2').<br></div><div><br></div><div>It is not possible to add it as context to the streams, because its information would<br></div><div>be completely redundant with the fact that all the data is written into per-cpu buffers,</div><div>and the cpu_id field is available within each packet context (which is right after each</div><div>packet header).<br></div><div><br></div><div>You just need to use babeltrace to convert to text, and while doing so, it prints a<br></div><div>"cpu_id = N" context based on the packet_context cpu_id field for each event.<br></div><div><br></div><div>Thanks,</div><div><br></div><div>Mathieu<br></div></div><div><br></div><div>-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a></div></div></div></blockquote></div>