any impact on performance from javac's debug option ?
Charles Oliver Nutter
charles.nutter at sun.com
Mon Aug 4 14:02:39 PDT 2008
John Rose wrote:
> On Aug 4, 2008, at 1:26 PM, Charles Oliver Nutter wrote:
>> I asked because I've seen that too...LogCompilation messages about a
>> method being too big when that method consisted almost entirely of an
>> assertion line. Guess I'll have to be more careful about not putting
>> assertions in the hottest, smallest methods like field accessors, eh?
> The most common cliff to step off of is MaxInlineSize, the size (in
> bytecodes) beyond which a method is not inlined unless there is strong
> evidence to the contrary, such as a hot profile. The number is
> currently 35. Adding an assert to a field accessor method should not
> kick you over that limit, unless the assert has a complex structure.
> Here's a rule of thumb, which should remain valid across a wide range of
> JVMs: If a hot method contains cold paths, factor the code on those
> paths out into a (private) subroutine. Assert expressions are cold
> paths, because they are not taken when asserts are disabled.
That's the general approach I've been taking...run LogCompilation, look
for "too big"s, slice and dice. I hadn't thought of splitting out the
assertion checks though, so I'll give that a go. Most of our assertion
checks aren't what I'd call complicated as much as comprehensive, in an
effort to avoid requiring those checks at all when assertions are off.
More information about the hotspot-dev