[ltt-dev] UST socket protocol

Nils Carlson nils.carlson at ericsson.com
Thu Sep 9 11:45:32 EDT 2010



On Thu, 9 Sep 2010, Pierre-Marc Fournier wrote:

> On 09/07/2010 02:30 AM, Nils Carlson wrote:
>> I've been looking through the socket protocol for UST and am a bit
>> curious about the construction of it. Is there a reason we haven't just
>> defined a ustctl package type with a command field, a result field and a
>> data field?
>>
>
> Not sure I understand.
>
> There is the socket protocol and there is the ustcmd API. The ustcmd API
> is there to make it easy to control tracing in a system from within a C
> program like TCF or ustctl. It in turn converts the commands it receives
> to the text-based ust socket protocol which libust (inside the traced
> app) is able to parse.

That's the one I'm reffering to. And what I'm asking is why it's using 
plain text to do option parsing and not some much simpler binary commands? 
As all the parts are part of libust and no traffic is going over a network 
you could more or less send whole structs and use enums for commands, this 
would reduce the amount of parsing code substantially.

/Nils




More information about the lttng-dev mailing list