[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] JIT code registration

From: Steve Fink
Subject: [Libunwind-devel] JIT code registration
Date: Sat, 29 Oct 2011 20:17:38 -0700

I am registering custom unwind info for JIT code with
_U_dyn_register(). All of my JIT code has identical and nearly trivial
unwind info. There's some complexity in the various trampolines I use
to enter the JIT code bodies, but those are common code routines
implemented with inline assembly, and so I already have .cfi
directives for statically describing those.

The documentation is unclear, but it looks like any code described by
unw_dyn_info_t's start_ip/end_ip that is *not* covered by a region
directive will be implicitly covered by the last region directive, or
perhaps the last nonnegative sized region? If so, that allows me to
describe all of my unwind info in a single zero-length region that I
use for all JIT code. Is that interpretation correct?

Also, I tend to have one large JIT code region that I register
initially, and then a flurry of small code regions that are generated
for ICs (inline caches). When I destroy the JIT code, I destroy a
large address range containing the main code bodies along with lots of
ICs. I could iterate through all of the unw_dyn_info_t structures to
find the ones to kill, but the docs say I should keep my dirty fingers
off of .next and .prev. Not only that, but they aren't guaranteed to
be in any particular order, so I can't optimize by relying on sorting.
I can keep pointers to them externally in an ordered tree, but I'm
guessing this is a pretty common situation for any JIT with ICs, and
it might be nice to provide... something... in the API to help with
this. Batch deletion of some sort.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]