comparison src/share/vm/prims/jvmtiEnvBase.cpp @ 8124:5fc51c1ecdeb

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 05 Mar 2013 23:44:54 +0100
parents 2cb439954abf 8b46b0196eb0
children b9a918201d47
comparison
equal deleted inserted replaced
7943:a413bcd552a4 8124:5fc51c1ecdeb
1 /* 1 /*
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 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.
72 assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check"); 72 assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
73 assert(_globally_initialized == false, "bad call"); 73 assert(_globally_initialized == false, "bad call");
74 74
75 JvmtiManageCapabilities::initialize(); 75 JvmtiManageCapabilities::initialize();
76 76
77 #ifndef JVMTI_KERNEL
78 // register extension functions and events 77 // register extension functions and events
79 JvmtiExtensions::register_extensions(); 78 JvmtiExtensions::register_extensions();
80 #endif // !JVMTI_KERNEL
81 79
82 #ifdef JVMTI_TRACE 80 #ifdef JVMTI_TRACE
83 JvmtiTrace::initialize(); 81 JvmtiTrace::initialize();
84 #endif 82 #endif
85 83
234 JvmtiManageCapabilities::relinquish_capabilities(caps, caps, caps); 232 JvmtiManageCapabilities::relinquish_capabilities(caps, caps, caps);
235 233
236 // Same situation as with events (see above) 234 // Same situation as with events (see above)
237 set_native_method_prefixes(0, NULL); 235 set_native_method_prefixes(0, NULL);
238 236
239 #ifndef JVMTI_KERNEL
240 JvmtiTagMap* tag_map_to_deallocate = _tag_map; 237 JvmtiTagMap* tag_map_to_deallocate = _tag_map;
241 set_tag_map(NULL); 238 set_tag_map(NULL);
242 // A tag map can be big, deallocate it now 239 // A tag map can be big, deallocate it now
243 if (tag_map_to_deallocate != NULL) { 240 if (tag_map_to_deallocate != NULL) {
244 delete tag_map_to_deallocate; 241 delete tag_map_to_deallocate;
245 } 242 }
246 #endif // !JVMTI_KERNEL
247 243
248 _needs_clean_up = true; 244 _needs_clean_up = true;
249 } 245 }
250 246
251 247
253 assert(SafepointSynchronize::is_at_safepoint(), "sanity check"); 249 assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
254 250
255 // There is a small window of time during which the tag map of a 251 // There is a small window of time during which the tag map of a
256 // disposed environment could have been reallocated. 252 // disposed environment could have been reallocated.
257 // Make sure it is gone. 253 // Make sure it is gone.
258 #ifndef JVMTI_KERNEL
259 JvmtiTagMap* tag_map_to_deallocate = _tag_map; 254 JvmtiTagMap* tag_map_to_deallocate = _tag_map;
260 set_tag_map(NULL); 255 set_tag_map(NULL);
261 // A tag map can be big, deallocate it now 256 // A tag map can be big, deallocate it now
262 if (tag_map_to_deallocate != NULL) { 257 if (tag_map_to_deallocate != NULL) {
263 delete tag_map_to_deallocate; 258 delete tag_map_to_deallocate;
264 } 259 }
265 #endif // !JVMTI_KERNEL
266 260
267 _magic = BAD_MAGIC; 261 _magic = BAD_MAGIC;
268 } 262 }
269 263
270 264
590 jclass 584 jclass
591 JvmtiEnvBase::get_jni_class_non_null(Klass* k) { 585 JvmtiEnvBase::get_jni_class_non_null(Klass* k) {
592 assert(k != NULL, "k != NULL"); 586 assert(k != NULL, "k != NULL");
593 return (jclass)jni_reference(k->java_mirror()); 587 return (jclass)jni_reference(k->java_mirror());
594 } 588 }
595
596 #ifndef JVMTI_KERNEL
597 589
598 // 590 //
599 // Field Information 591 // Field Information
600 // 592 //
601 593
1480 jmsdi->stack_depth = -1; 1472 jmsdi->stack_depth = -1;
1481 _owned_monitors_list->append(jmsdi); 1473 _owned_monitors_list->append(jmsdi);
1482 } 1474 }
1483 } 1475 }
1484 } 1476 }
1485
1486 #endif // !JVMTI_KERNEL