Page MenuHomePhabricator

Add support for StackMap section for ELF/Linux systems

Authored by reames on Jul 17 2014, 3:32 PM.



This patch emits the StackMap section on ELF systems. This is required to support llvm.experimental.stackmap and llvm.experimental.patchpoint.

Careful review is appreciated. I don't know the areas I'm touching well and may have gotten things wrong. A couple of things for specific review:

  • Are the flags to getELFSection correct?
  • Should I change the name of label following the section start?

Worth noting is that previous versions of this patch have been proposed but not submitted several times. For example, one was proposed here:

The code in this change set is original.

Diff Detail


Event Timeline

reames updated this revision to Diff 11615.Jul 17 2014, 3:32 PM
reames retitled this revision from to Add support for StackMap section for ELF/Linux systems.
reames updated this object.
reames edited the test plan for this revision. (Show Details)
reames added reviewers: atrick, ributzka.
reames added a subscriber: Unknown Object (MLST).
ributzka added inline comments.
590 ↗(On Diff #11615)

I am not familiar with the ELF sections, but wouldn't Metadata be a better for for this section. I guess it doesn't work with it, because the JIT won't ask the client to allocate it?

Lang knows more about this part of the JIT.

reames added inline comments.Jul 21 2014, 10:08 AM
590 ↗(On Diff #11615)

Worth noting:

  1. The COFF section uses getMetadata
  2. getMetadata appears to work in practice

I'm happy to make the change, but don't feel like I understand the implications. Reading through the documentation, I'm unclear on the semantics. Lang, can you clarify?

reames updated this revision to Diff 11725.Jul 21 2014, 3:47 PM

Switching the section type to be metadata instead of readonly based on review comments.

ributzka accepted this revision.Jul 24 2014, 2:49 PM
ributzka edited edge metadata.


This revision is now accepted and ready to land.Jul 24 2014, 2:49 PM

Yes, LGTM too. Sorry I missed this.


reames closed this revision.Aug 1 2014, 11:56 AM
reames updated this revision to Diff 12115.

Closed by commit rL214538 (authored by @reames).