Christian Thalinger wrote:
On Jan 4, 2011, at 10:00 PM, Paul Hohensee wrote:
  
These two rfes implement per-thread approximate memory allocation tracking.
6173675 also adds multi-thread-id versions of getThreadCpuTime and getThreadUserTime.

6173675 M&M: approximate memory allocation rate/amount per thread
7003271 Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
    

src/os/solaris/vm/thread_solaris.inline.hpp:

  56   Thread *candidate = ThreadLocalStorage::_get_thread_cache[ix];

You could have fixed the * in that line too.
  
done.
src/share/vm/opto/macro.cpp:

1242         new (C, 4) StorePNode( needgc_false, contended_phi_rawmem, eden_top_adr,
1243                                TypeRawPtr::BOTTOM, new_eden_top );

1249         new (C, 5) StorePConditionalNode( needgc_false, contended_phi_rawmem, eden_top_adr,
1250                                           new_eden_top, fast_oop/*old_eden_top*/ );

1284       Node* new_alloc_bytes = new (C, 3) AddLNode( alloc_bytes, alloc_size );

Could you also remove the spaces before and after the parentheses when you're at it?
  
done, plus a bit more. :)
MacroAssembler::incr_allocated_bytes:

It seems we could use a RegisterOrConstant size_in_bytes argument instead of Register var_size_in_bytes, int con_size_in_bytes.
  
I'd rather leave this alone, since both eden_allocate() and tlab_allocate() use the two-parameter paradigm
and I'd have to change those also.
Otherwise it looks good.
  
Thanks for the review!

paul
-- Christian

Reply via email to