[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Accessing LTTng-ust cpu_id event field inside an XML state provider

Welcome, this is appropriate!


Short answer:

         <stateAttribute type="eventField" value="cpu" />

Long answer:

The CPU_ID is not an event field. you can tell by the fact that it's in
different brackets,

Here is your entry:
[17:33:44.238047390] (+0.000000366) xeon08 nanos:ust_task_label: { cpu_id = 24 }, { vpid = 24505, vtid = 24557, procname = "cholesky-weakit" }, { task_id = 1, task_label = "dgemm" }
[17:33:44.238047390] <- timestamp
(+0.000000366) <- delta, inferred by bt
xeon08 <- trace name
nanos:ust_task_label <- event name
{ cpu_id = 24 } <- Packet context (?)
{ vpid = 24505, vtid = 24557, procname = "cholesky-weakit" } <- added context
{ task_id = 1, task_label = "dgemm" } <- event fields

In tracecompass, the "added context"s are prepended with context and put in the fields

since the CPU is so vital for most analyses, we also added a shortcut as "cpu" for it.

@Genevieve or @JC
Feel free to enhance if my explanation is found wanting. :)

Thanks!
Matthew

On 18-03-09 09:06 AM, aleix wrote:
> Hello!
>
> This is my first message on the list, please excuse me if it is not
> appropiate.
>
> I'm writing a custom state provider in XML and I'm wondering
> how can I access the CPU id of a user space event within the state
> provider. I have tried with:
>
>   <stateAttribute type="eventField" value="cpu_id" />
>   
> But it is not found. The babeltrace output of the LTTng trace shows me:
>
> [17:33:44.238047390] (+0.000000366) xeon08 nanos:ust_task_label: { cpu_id = 24 }, { vpid = 24505, vtid = 24557, procname = "cholesky-weakit" }, { task_id = 1, task_label = "dgemm" }
>
> so the "cpu_id" field is present, although is not one of the
> user-defined tracepoint parameters such as "task_id" or "task_label".
>
> Any hint?
>
> http://bsc.es/disclaimer
> _______________________________________________
> tracecompass-dev mailing list
> tracecompass-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tracecompass-dev