<font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I seem to have a problem setting a filter
during enable-event, which happens in a script immediately after add-context
succeeds. The error is "Error: Invalid filter bytecode".</font>
<br>
<br><font size=2 face="sans-serif">The sequence I am going through is in
the following script excerpt:</font>
<br>
<br><tt><font size=2>lttng-sessiond with --no-kernel -v --verbose-consumer
       >> logfile 2>&1</font></tt>
<br><tt><font size=2>lttng create samba -o /local/traces/lttng/20130625114835
    >> logfile 2>&1</font></tt>
<br><tt><font size=2>lttng enable-channel channel0 -u \</font></tt>
<br><tt><font size=2>               
        --tracefile-size ${LTTNG_MAX_TRACE_FILE_SIZE}
\</font></tt>
<br><tt><font size=2>               
        --tracefile-count ${LTTNG_MAX_FILES_PER_CORE}
\</font></tt>
<br><tt><font size=2>               
        --buffers-uid \</font></tt>
<br><tt><font size=2>               
        --switch-timer 1000000 \</font></tt>
<br><tt><font size=2>               
        --num-subbuf 16 \</font></tt>
<br><tt><font size=2>               
        --subbuf-size 262144        
        >> logfile 2>&1</font></tt>
<br><tt><font size=2>lttng add-context -u -t procname -s samba -c channel0
       >> logfile 2>&1</font></tt>
<br><tt><font size=2>lttng enable-event -u -a --filter '$ctx.procname ==
"smbd" || $ctx.procname == "winbindd"'</font></tt>
<br>
<br><font size=2 face="sans-serif">The output is shown here (with the enable-event
command-line reproduced:</font>
<br>
<br><tt><font size=2>Session samba created.</font></tt>
<br><tt><font size=2>Traces will be written in /local/traces/lttng/20130625114835</font></tt>
<br><tt><font size=2>UST channel channel0 enabled for session samba</font></tt>
<br><tt><font size=2>UST context procname added to channel channel0</font></tt>
<br><tt><font size=2>/usr/bin/lttng enable-event -u -a --filter '$ctx.procname=="smbd"
|| $ctx.procname=="winbindd"'</font></tt>
<br><tt><font size=2>error syntax error</font></tt>
<br><tt><font size=2>Parse error</font></tt>
<br><tt><font size=2>Error: Invalid filter bytecode</font></tt>
<br>
<br><font size=2 face="sans-serif">If I try to wait after the failure for
some time, I can run lttng disable-event -u -a, and re-run the enable-event
with the filter successfully. But I tried to put the disable-event command
in the script and that didn't help - i.e. the "disable-event"
command worked, but the enable-event with filter still failed in the same
way.</font>
<br>
<br><font size=2 face="sans-serif">Suggestions?</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br>
<br><font size=2 color=#000080 face="sans-serif">Amit Margalit</font>
<br><font size=2 color=#808000 face="sans-serif">IBM XIV </font><font size=2 face="sans-serif">-
<i>Storage Reinvented</i></font>
<br><font size=2 face="sans-serif">XIV-NAS Development Team</font>
<br><font size=2 face="sans-serif">Tel. 03</font><font size=2 face="Arial">-689-7774</font>
<br><font size=2 face="Arial">Fax. 03-689-7230</font>