Page MenuHomePhabricator

[CMake] Support generation of linker order files using dtrace
ClosedPublic

Authored by beanz on Jan 12 2016, 11:23 PM.

Details

Summary

This patch extends the lit-based perf-training tooling supplied for PGO data generation to also generate linker order files using dtrace.

This patch should work on any system that has dtrace. If CMake can find the dtrace tool it will generate a target 'generate-order-file' which will run the per-training tests wrapped by dtrace to capture function entries. There are several algorithms implemented for sorting the order files which can be experimented with for best performance. The dtrace wrapper also supports bot oneshot and pid probes.

The perf-helper.py changes to support order file construction are ported from internal changes by ddunbar; he gets all the credit for the hard work here, I just copy and pasted.

Note: I've tested these patches on FreeBSD and OS X 10.10.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 44712.Jan 12 2016, 11:23 PM
beanz retitled this revision from to [CMake] Support generation of linker order files using dtrace.
beanz updated this object.
beanz added reviewers: ddunbar, bogner, silvas.
beanz added a subscriber: llvm-commits.
This revision was automatically updated to reflect the committed changes.