This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Make the xray_instr_map section specification more correct
ClosedPublic

Authored by dberris on Aug 2 2016, 10:44 PM.

Details

Summary

We also add a test to show what currently happens when we create a
section per function and emit an xray_instr_map. This illustrates the
relationship (or lack thereof) between the per-function section and the
xray_instr_map section.

We also change the code generation slightly so that we don't always
create group sections, but rather only do so if a function where the
table is associated with is in a group.

Also in this change:

  • Remove the "merge" flag on the xray_instr_map section.
  • Test that we're generating the right table for comdat and non-comdat functions.

Diff Detail

Event Timeline

dberris updated this revision to Diff 66614.Aug 2 2016, 10:44 PM
dberris retitled this revision from to [XRay] Set entsize for the xray_instr_map section.
dberris updated this object.
dberris added reviewers: echristo, majnemer.
dberris added a subscriber: llvm-commits.
dberris updated this revision to Diff 66621.Aug 3 2016, 12:07 AM
  • Only use groups if the original function is defined in a group too
dberris updated this object.Aug 3 2016, 12:13 AM
majnemer accepted this revision.Aug 3 2016, 12:22 AM
majnemer edited edge metadata.

LGTM

lib/Target/X86/X86MCInstLower.cpp
1106

you have a SwitchSection a few lines down.

This revision is now accepted and ready to land.Aug 3 2016, 12:22 AM
dberris retitled this revision from [XRay] Set entsize for the xray_instr_map section to [XRay] Make the xray_instr_map section specification more correct.Aug 3 2016, 12:25 AM
dberris edited edge metadata.
This revision was automatically updated to reflect the committed changes.