any impact on performance from javac's debug option ?

Charles Oliver Nutter charles.nutter at sun.com
Mon Aug 4 13:26:27 PDT 2008


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?

John Rose wrote:
> We've seen cases where performance went down after an assert was added, 
> solely due to an inlining heuristic that flipped.  There will always be 
> cases where a semantically null change will cause the heuristics to 
> detune.  But as Tom says there are things we want to do to make it 
> happen less often, such as adjusting the sizing metrics to not charge 
> for unused basic blocks.
> 
> -- John
> 
> On Aug 4, 2008, at 1:09 PM, Tom Rodriguez wrote:
> 
>> Unfortunately yes.  There's a bug filed about it though I don't 
>> remember the id offhand.  The compilers should use sizing metrics 
>> which take asserts into account, along with having some bytecode 
>> specific metrics, but we haven't done any work on this yet.  Hiding 
>> the existence of asserts is slighly tricky since it requires at least 
>> som control flow analysis.
>>
>> tom
>>
>> On Aug 4, 2008, at 12:53 PM, Charles Oliver Nutter wrote:
>>> On a similar note, what about asserts? Do they add to bytecode size 
>>> and thereby affect inlining decisions?




More information about the hotspot-dev mailing list