Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research Inlined Instance data #53

Open
stevemk14ebr opened this issue Apr 16, 2024 · 3 comments · May be fixed by #59
Open

Research Inlined Instance data #53

stevemk14ebr opened this issue Apr 16, 2024 · 3 comments · May be fixed by #59
Assignees

Comments

@stevemk14ebr
Copy link
Collaborator

https://github.com/elastic/otel-profiling-agent/blob/main/docs/gopclntab.md

speaks of Inlined Instance Data. Research how this can be utilized for RE purposed and labelling an IDA database better.

@stevemk14ebr
Copy link
Collaborator Author

stevemk14ebr commented Apr 16, 2024

struct runtime_inlinedCall {
  uint8_t funcID;
  uint8_t _[3];
  int32_t nameOff;
  int32_t parentPc;
  int32_t startLine;
};

From the document, parentPc can be used to locate the parent function, and startLine + nameOff can likely be used to annotate the specific VA where an inlined function starts (and ends) by name. I suspect startLine will need to be looked up in the line table to get the VA rather than line number.

@brigadier-general brigadier-general self-assigned this May 15, 2024
@brigadier-general
Copy link
Collaborator

go src file with inlining logic, for reference -- https://github.com/golang/go/blob/go1.20.6/src/cmd/compile/internal/inline/inl.go

@brigadier-general
Copy link
Collaborator

brigadier-general commented May 15, 2024

explanation of how/why go compiler does leaf inlining -- https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go

@stevemk14ebr stevemk14ebr linked a pull request Jun 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants