[lttng-dev] Regarding lttng enable-event using filter option

Suchakrapani Datt Sharma suchakrapani.sharma at polymtl.ca
Tue Mar 10 07:53:17 EDT 2015


Hi,

> o/p
> Event com_ericsson_tri*: Filter 'strfield == "TRACE_UTS"' successfully set
>
> So , If I have enabled above event with filter , the traces which have
> string field with TRACE_UTS as data should not be logged. This is as per
> my understanding. Is is correct ?

No, its not correct. There is no field with the name "strfield" in  
your trace playload.

For example, if this is what your tracepoint records in a usual case,

[07:45:08.810173787] (+0.000017406) isengard retlif_tp:tpfilt: {  
cpu_id = 1 }, { var0 = "str0", var1 = "str1", var2 = "str2", var3 =  
"str3", var4 = "str4", var5 = "str5", var6 = "str6", var7 = "str7",  
var8 = "str8", lyf = 42 }

Then you can set a filter like this,

lttng enable-event -u retlif_tp:tpfilt --filter '(var0 == "str0") &&  
(var1 == "Jon") && (var2 == "Doe") && (lyf == 42)'

This works for me.

--
Suchakra





More information about the lttng-dev mailing list