This is an archive of the discontinued LLVM Phabricator instance.

Fix jit event listeners
ClosedPublic

Authored by andrew.w.kaylor on Jan 9 2015, 1:44 PM.

Details

Reviewers
lhames
Summary

This patch fixes a problem that had crept in with the JIT event listeners (both the oprofile listener and the Intel-specific listener) and replaces the tests, which had rotted from disuse.

Arch Robison contributed the fix to EventListenerCommon.h and handed it off to me since I was working on fixing the JitListener tests.

The new JitListener tests are fairly basic. It would be nice to have a test for the inlined function case, but I wanted to just get something working for now. I'm not sure that the old parameter and common symbol tests ever had any relevance to the JitListeners, which only report functions and line numbers.

I have initiated a request to have the LLVM_USE_INTEL_JITEVENTS option turned on for one of the buildbots so that these tests will be run regularly. The people who own the buildbot I have in mind are currently on holiday, but they did tell me that they are open to doing this.

Long term I would like to enable both the oprofile and the Intel JIT listeners by default for applicable platforms (removing the code that automatically registers the listeners) so that more developers will see emerging failures before the commits that cause them. I don't think there's anything architecture-specific in the tests (they don't even depend on the profiling tools being present) so it might be possible to enable the tests everywhere. It would also be nice to extend the current llvm-jitlistener tool so that it is also capable of testing the oprofile listener (which currently has no tests). At some point I'd also like to refactor the oprofile and Intel listeners so that they share the code to parse debug info.

Diff Detail

Repository
rL LLVM

Event Timeline

andrew.w.kaylor retitled this revision from to Fix jit event listeners.
andrew.w.kaylor updated this object.
andrew.w.kaylor edited the test plan for this revision. (Show Details)
andrew.w.kaylor added a reviewer: lhames.
andrew.w.kaylor set the repository for this revision to rL LLVM.
andrew.w.kaylor added a subscriber: Unknown Object (MLST).
lhames accepted this revision.Jan 9 2015, 2:11 PM
lhames edited edge metadata.

HI Andy,

This looks good to me. Thanks very much for the fix.

The shared parsing framework sounds like a good idea too - I think that would find clients outside oprofile and intel listeners.

  • Lang.
This revision is now accepted and ready to land.Jan 9 2015, 2:11 PM

Changes committed as r225554.

test/JitListener/test-inline.ll