[llvm-commits] [PATCH] [Review request] Adding getLineInforForAddressRange() to DIContext

Kaylor, Andrew andrew.kaylor at intel.com
Thu Jan 24 15:10:42 PST 2013


Hi Eric,

This code is a bit tricky to test because the changes don't modify the behavior of any of the standard llvm tools.  I have been testing in with the llvm-jitlistner tool, but that only gets built if Intel JIT profiling is enabled in the build, which it isn't for any of the buildbots.

I created a "unit test" that verifies this functionality, but it's a little ugly in that: (1) it depends on a fair number of components and so isn't really a unit test in the usual sense, and (2) it requires a couple of binary input files that I wasn't entirely clear on how to make available to a unit test.

To find the input files I put a line in the CMakeFile.txt file for the unit test, that looks like this (and I suppose I'll need something equivalent in the Makefile:

add_definitions(-DLLVM_SRC_ROOT="${LLVM_MAIN_SRC_DIR}")

Then I use that symbol inside the unit test to read in the file.

Is there a better way to do this?

-Andy

From: Eric Christopher [mailto:echristo at gmail.com]
Sent: Thursday, January 24, 2013 1:03 AM
To: Kaylor, Andrew
Cc: llvm-commits
Subject: Re: [PATCH] [Review request] Adding getLineInforForAddressRange() to DIContext

This looks fine in general. I'd like some testcases though please.

Thanks!

-eric

On Mon, Jan 21, 2013 at 3:37 PM, Kaylor, Andrew <andrew.kaylor at intel.com<mailto:andrew.kaylor at intel.com>> wrote:
This patch adds a new method, getLineInfoForAddressRange, to the DIContext interface class and provides an implementation for that method in the DebugInfo code.

This is a subset of a patch I submitted last week (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130114/162210.html).  There is nothing new in this patch, I have simply isolated the DebugInfo-specific changes to make review easier.

The new method will be used by the IntelJITEventListener to provide line information for profiling code generated by MCJIT, but these changes are not dependent on the JIT event listener changes.  I'll resubmit the JIT event listener changes momentarily for context.

-Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130124/57b721a9/attachment.html>


More information about the llvm-commits mailing list