comparison src/share/vm/oops/cpCache.hpp @ 8021:8d9fc28831cc

7182152: Instrumentation hot swap test incorrect monitor count Summary: Add/refine new tracing support using -XX:TraceRedefineClasses=16384. Reviewed-by: coleenp, acorn, sspitsyn
author dcubed
date Wed, 06 Feb 2013 14:31:37 -0800
parents 64672b22ef05
children 3efdfd6ddbf2
comparison
equal deleted inserted replaced
7988:f3ea1af9207a 8021:8d9fc28831cc
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
335 static ByteSize indices_offset() { return byte_offset_of(ConstantPoolCacheEntry, _indices); } 335 static ByteSize indices_offset() { return byte_offset_of(ConstantPoolCacheEntry, _indices); }
336 static ByteSize f1_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f1); } 336 static ByteSize f1_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f1); }
337 static ByteSize f2_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f2); } 337 static ByteSize f2_offset() { return byte_offset_of(ConstantPoolCacheEntry, _f2); }
338 static ByteSize flags_offset() { return byte_offset_of(ConstantPoolCacheEntry, _flags); } 338 static ByteSize flags_offset() { return byte_offset_of(ConstantPoolCacheEntry, _flags); }
339 339
340 #if INCLUDE_JVMTI
340 // RedefineClasses() API support: 341 // RedefineClasses() API support:
341 // If this constantPoolCacheEntry refers to old_method then update it 342 // If this ConstantPoolCacheEntry refers to old_method then update it
342 // to refer to new_method. 343 // to refer to new_method.
343 // trace_name_printed is set to true if the current call has 344 // trace_name_printed is set to true if the current call has
344 // printed the klass name so that other routines in the adjust_* 345 // printed the klass name so that other routines in the adjust_*
345 // group don't print the klass name. 346 // group don't print the klass name.
346 bool adjust_method_entry(Method* old_method, Method* new_method, 347 bool adjust_method_entry(Method* old_method, Method* new_method,
347 bool * trace_name_printed); 348 bool * trace_name_printed);
348 NOT_PRODUCT(bool check_no_old_entries();) 349 bool check_no_old_or_obsolete_entries();
349 bool is_interesting_method_entry(Klass* k); 350 bool is_interesting_method_entry(Klass* k);
351 #endif // INCLUDE_JVMTI
350 352
351 // Debugging & Printing 353 // Debugging & Printing
352 void print (outputStream* st, int index) const; 354 void print (outputStream* st, int index) const;
353 void verify(outputStream* st) const; 355 void verify(outputStream* st) const;
354 356
421 static ByteSize entry_offset(int raw_index) { 423 static ByteSize entry_offset(int raw_index) {
422 int index = raw_index; 424 int index = raw_index;
423 return (base_offset() + ConstantPoolCacheEntry::size_in_bytes() * index); 425 return (base_offset() + ConstantPoolCacheEntry::size_in_bytes() * index);
424 } 426 }
425 427
428 #if INCLUDE_JVMTI
426 // RedefineClasses() API support: 429 // RedefineClasses() API support:
427 // If any entry of this constantPoolCache points to any of 430 // If any entry of this ConstantPoolCache points to any of
428 // old_methods, replace it with the corresponding new_method. 431 // old_methods, replace it with the corresponding new_method.
429 // trace_name_printed is set to true if the current call has 432 // trace_name_printed is set to true if the current call has
430 // printed the klass name so that other routines in the adjust_* 433 // printed the klass name so that other routines in the adjust_*
431 // group don't print the klass name. 434 // group don't print the klass name.
432 void adjust_method_entries(Method** old_methods, Method** new_methods, 435 void adjust_method_entries(Method** old_methods, Method** new_methods,
433 int methods_length, bool * trace_name_printed); 436 int methods_length, bool * trace_name_printed);
434 NOT_PRODUCT(bool check_no_old_entries();) 437 bool check_no_old_or_obsolete_entries();
438 void dump_cache();
439 #endif // INCLUDE_JVMTI
435 440
436 // Deallocate - no fields to deallocate 441 // Deallocate - no fields to deallocate
437 DEBUG_ONLY(bool on_stack() { return false; }) 442 DEBUG_ONLY(bool on_stack() { return false; })
438 void deallocate_contents(ClassLoaderData* data) {} 443 void deallocate_contents(ClassLoaderData* data) {}
439 bool is_klass() const { return false; } 444 bool is_klass() const { return false; }