comparison src/share/vm/prims/jvmtiRedefineClasses.hpp @ 7949:5daaddd917a1

8006040: NPG: on_stack processing wastes space in ConstantPool Summary: Added on_stack bit to flags. Also MetadataMarkOnStack is used for more than JVMTI so had to be moved. Reviewed-by: dholmes, stefank
author coleenp
date Wed, 23 Jan 2013 10:34:29 -0500
parents fb19af007ffc
children 9bf5f643d1cf
comparison
equal deleted inserted replaced
7632:2ef7061f13b4 7949:5daaddd917a1
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.
485 485
486 // Modifiable test must be shared between IsModifiableClass query 486 // Modifiable test must be shared between IsModifiableClass query
487 // and redefine implementation 487 // and redefine implementation
488 static bool is_modifiable_class(oop klass_mirror); 488 static bool is_modifiable_class(oop klass_mirror);
489 }; 489 };
490
491
492 // Helper class to mark and unmark metadata used on the stack as either handles
493 // or executing methods, so that it can't be deleted during class redefinition
494 // and class unloading.
495 class MetadataOnStackMark : public StackObj {
496 NOT_PRODUCT(static bool _is_active;)
497 public:
498 MetadataOnStackMark() NOT_JVMTI_RETURN;
499 ~MetadataOnStackMark() NOT_JVMTI_RETURN;
500 static void record(Metadata* m) NOT_JVMTI_RETURN;
501 };
502
503 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP 490 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP