Skip to content

Support register based struct variables in dynamic logging #2106

@ddelnano

Description

@ddelnano

Go's ABI changed in version 1.17 and assigns arguments to registers rather than its previous stack based calling convention. Pixie's dynamic logging feature is in the process of supporting this new calling convention, but one of the area that won't be initially supported is tracing struct output values. In the previous ABI, dynamic logging was capable of printing out a full struct, even when there were nested fields. An example of what this looks like can be seen in the following bpf test.

Unfortunately this functionality assumed that a struct will exist packed and in a continuous chunk of memory. This isn't compatible with the new ABI since a struct's fields can be allocated across multiple registers. This is something that can be addressed, but will require some work to accommodate.

In the meantime, it's possible to access a struct's fields individually through an expr statement as seen here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/datacollectorIssues related to Stirling (datacollector)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions