Code Review for 7008325

Prepared by:twisti on Thu Dec 23 03:43:29 PST 2010
Workspace:/home/twisti/hotspot-comp/7008325
Compare against: /home/twisti/hotspot-comp/hotspot
Summary of changes: 51 lines changed: 25 ins; 11 del; 15 mod; 7711 unchg
Patch of changes: 7008325.patch
Printable review: 7008325.pdf
Author comments:
7008325: CodeCache exhausted on sparc starting from hs20b04
Reviewed-by:

The bug is that Compile::ScheduleAndBundle calls
init_scratch_buffer_blob and later clear_scratch_buffer_blob to reset
_scratch_buffer_blob and _scratch_locs_memory (setting to NULL). But
the CompilerWrapper destructor only frees the _scratch_buffer_blob if
it's non-null resulting in a CodeCache memory leak.

The fix is to remove clear_scratch_buffer_blob completely and let
init_scratch_buffer_blob free and allocate a new blob if required.

Additionally I added some code that prints the largest free block in
CodeCache::print_bounds (as found in the hs_err file).

Bug id: 7008325 CodeCache exhausted on sparc starting from hs20b04
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/code/codeCache.cpp

4 lines changed: 2 ins; 0 del; 2 mod; 943 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/code/codeCache.hpp

1 line changed: 1 ins; 0 del; 0 mod; 186 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/memory/heap.cpp

9 lines changed: 9 ins; 0 del; 0 mod; 485 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/memory/heap.hpp

1 line changed: 1 ins; 0 del; 0 mod; 170 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/compile.cpp

33 lines changed: 12 ins; 8 del; 13 mod; 3081 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/output.cpp

3 lines changed: 0 ins; 3 del; 0 mod; 2846 unchg

This code review page was prepared using /home/twisti/bin/webrev (vers 23.18-hg-never).