Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Parsing non standard data

Hi again Konrad,

There is a new still undocumented feature of the XML analysis that _may_ work with this, but I'm really not sure: _javascript_ state values

For instance, you write your state value like this example:

<stateValue type="script" value="op == 'op1' ? 'TRUE' : 'FALSE'" scriptEngine="nashorn">
                    <stateValue id="op" type="eventField" value="op" />
</stateValue>

But I have no idea how it will work with an array field, and it's still difficult to debug XML scripts (an intern is working on it right now though).

I would try something like this:

<stateValue type="script" value="String.fromCharCode(data[5]) + String.fromCharCode(data[6]" scriptEngine="nashorn">
                    <stateValue id="data" type="eventField" value="data" />
</stateValue>

But you're going in unchartered territory here. Let us know if you can make it work. Or if you can provide a trace and a base XML analysis, maybe we can try to see if it is even possible.

Good luck ;-)
Geneviève

On 08/02/2017 10:37 AM, Konrad Kokosa wrote:

Hi,

 

I am trying to make XML views for LTTng from CoreCLR. While for most events payload is being loaded correctly, some seems to have unparsed data. For example, DotNETRuntime:GCGenerationRange have Contents with all fields parsed:

 

Timestamp         Channel               CPU       Event type          Contents             Binary Location Function Location            Source Location

10:35:41.990 062 403    channel0_0        0             DotNETRuntime:GCGenerationRange    Generation=2, RangeStart=140491869908992, RangeUsedLength=24, RangeReservedLength=24, ClrInstanceID=0, context._vpid=39237, context._vtid=39254, context._procname=dotnet                                                                            

So I am able to draw XML XY chart based on, for example, RangeUsedLength.

 

But for some events there are only unparsed, __data related fields:

 

Timestamp         Channel               CPU       Event type          Contents             Binary Location Function Location            Source Location

10:35:41.990 066 003    channel0_0        0             DotNETRuntime:GCHeapStats_V1           length=94, ___data___length=94, __data__=[120, 136, 28, 0, 0, 0, 0, 0, 176, 254, 16, 0, 0, 0, 0, 0, 240, 10, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242, 91, 1, 0, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 11, 0, 0, 0, 165, 0, 0, 0, 0, 0], context._vpid=39237, context._vtid=39254, context._procname=dotnet                                     

I know LTTng USG Trace parsing is used here but I am not sure if it is possible to extend it somehow to get very valuable fields hidden in __data__ field?

 

Konrad Kokosa



_______________________________________________
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


Back to the top