lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] [barectf] no nested types?
@ 2021-02-05 21:58 RADERMACHER Ansgar via lttng-dev
  2021-02-08 10:27 ` RADERMACHER Ansgar via lttng-dev
  0 siblings, 1 reply; 3+ messages in thread
From: RADERMACHER Ansgar via lttng-dev @ 2021-02-05 21:58 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 777 bytes --]

Hello,

I've generated a config.yaml from type definitions in UML. If the type of a payload field is a UML DataType, the generator produces an associated type alias file with "class = structure" and the contained members.

When I tried to compile the configuration file, I get an error message from barectf:
`field-type` property: Nested structure field types are not supported

It this really not supported or are there other mechanisms that enable the use of nested types? If not supported, it would be an important restriction which seems to be not prominently documented (in [1], there is a parenthesis "except a structure field type object" but it's easy to miss)

Best regards

Ansgar


[1] https://barectf.org/docs/barectf/3.0/yaml/struct-ft-obj.html



[-- Attachment #1.2: Type: text/html, Size: 2358 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lttng-dev] [barectf] no nested types?
  2021-02-05 21:58 [lttng-dev] [barectf] no nested types? RADERMACHER Ansgar via lttng-dev
@ 2021-02-08 10:27 ` RADERMACHER Ansgar via lttng-dev
  2021-02-08 14:58   ` Philippe Proulx via lttng-dev
  0 siblings, 1 reply; 3+ messages in thread
From: RADERMACHER Ansgar via lttng-dev @ 2021-02-08 10:27 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1444 bytes --]

Dear all,

having thought a bit more about it, I can see now that nested types are problematic in general: some types in the language need to be mapped to types that match but are not identical, i.e. have likely a different memory layout. This would be problematic for nested types.
Thus, I'm opting for flattening data (with the exception of lists).

Best regards

Ansgar


________________________________
From: lttng-dev [lttng-dev-bounces@lists.lttng.org] on behalf of RADERMACHER Ansgar via lttng-dev [lttng-dev@lists.lttng.org]
Sent: Friday, February 05, 2021 22:58
To: lttng-dev@lists.lttng.org
Subject: [lttng-dev] [barectf] no nested types?

Hello,

I've generated a config.yaml from type definitions in UML. If the type of a payload field is a UML DataType, the generator produces an associated type alias file with "class = structure" and the contained members.

When I tried to compile the configuration file, I get an error message from barectf:
`field-type` property: Nested structure field types are not supported

It this really not supported or are there other mechanisms that enable the use of nested types? If not supported, it would be an important restriction which seems to be not prominently documented (in [1], there is a parenthesis "except a structure field type object" but it's easy to miss)

Best regards

Ansgar


[1] https://barectf.org/docs/barectf/3.0/yaml/struct-ft-obj.html



[-- Attachment #1.2: Type: text/html, Size: 3480 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lttng-dev] [barectf] no nested types?
  2021-02-08 10:27 ` RADERMACHER Ansgar via lttng-dev
@ 2021-02-08 14:58   ` Philippe Proulx via lttng-dev
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Proulx via lttng-dev @ 2021-02-08 14:58 UTC (permalink / raw)
  To: RADERMACHER Ansgar; +Cc: lttng-dev

On Mon, Feb 8, 2021 at 5:27 AM RADERMACHER Ansgar via lttng-dev
<lttng-dev@lists.lttng.org> wrote:
>
> Dear all,
>
> having thought a bit more about it, I can see now that nested types are problematic in general: some types in the language need to be mapped to types that match but are not identical, i.e. have likely a different memory layout. This would be problematic for nested types.

Exactly: compound types represent a challenge in general because we
don't know the memory layout details of the user data, so we can't just
copy bytes as is to a CTF data stream.

There are strategies to achieve such a feature in barectf and in
LTTng-UST (similar problem), but implementing and testing them is not on
the roadmap currently.

This is why both barectf and LTTng-UST support basic arrays of
simple/scalar instances (numbers and strings), but not the rest, even if
CTF itself can represent more complex data.

barectf supports nested static arrays [1], but not nested dynamic
arrays.

Hope this helps,

Phil

[1]: https://barectf.org/docs/barectf/3.0/yaml/static-array-ft-obj.html

> Thus, I'm opting for flattening data (with the exception of lists).
>
> Best regards
>
> Ansgar
>
>
> ________________________________
> From: lttng-dev [lttng-dev-bounces@lists.lttng.org] on behalf of RADERMACHER Ansgar via lttng-dev [lttng-dev@lists.lttng.org]
> Sent: Friday, February 05, 2021 22:58
> To: lttng-dev@lists.lttng.org
> Subject: [lttng-dev] [barectf] no nested types?
>
> Hello,
>
> I've generated a config.yaml from type definitions in UML. If the type of a payload field is a UML DataType, the generator produces an associated type alias file with "class = structure" and the contained members.
>
> When I tried to compile the configuration file, I get an error message from barectf:
> `field-type` property: Nested structure field types are not supported
>
> It this really not supported or are there other mechanisms that enable the use of nested types? If not supported, it would be an important restriction which seems to be not prominently documented (in [1], there is a parenthesis "except a structure field type object" but it's easy to miss)
>
> Best regards
>
> Ansgar
>
>
> [1] https://barectf.org/docs/barectf/3.0/yaml/struct-ft-obj.html
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-08 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 21:58 [lttng-dev] [barectf] no nested types? RADERMACHER Ansgar via lttng-dev
2021-02-08 10:27 ` RADERMACHER Ansgar via lttng-dev
2021-02-08 14:58   ` Philippe Proulx via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).