pixie icon indicating copy to clipboard operation
pixie copied to clipboard

Support register based struct variables in dynamic logging

Open ddelnano opened this issue 10 months ago • 0 comments

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.

ddelnano avatar Feb 03 '25 07:02 ddelnano