1 /*
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
461 bool rewrite_cp_refs_in_fields_annotations(
462 instanceKlassHandle scratch_class, TRAPS);
463 void rewrite_cp_refs_in_method(methodHandle method,
464 methodHandle * new_method_p, TRAPS);
465 bool rewrite_cp_refs_in_methods(instanceKlassHandle scratch_class, TRAPS);
466 bool rewrite_cp_refs_in_methods_annotations(
467 instanceKlassHandle scratch_class, TRAPS);
468 bool rewrite_cp_refs_in_methods_default_annotations(
469 instanceKlassHandle scratch_class, TRAPS);
470 bool rewrite_cp_refs_in_methods_parameter_annotations(
471 instanceKlassHandle scratch_class, TRAPS);
472 void rewrite_cp_refs_in_stack_map_table(methodHandle method, TRAPS);
473 void rewrite_cp_refs_in_verification_type_info(
474 address& stackmap_addr_ref, address stackmap_end, u2 frame_i,
475 u1 frame_size, TRAPS);
476 void set_new_constant_pool(instanceKlassHandle scratch_class,
477 constantPoolHandle scratch_cp, int scratch_cp_length, bool shrink, TRAPS);
478
479 void flush_dependent_code(instanceKlassHandle k_h, TRAPS);
480
481 static void check_class(klassOop k_oop, oop initiating_loader, TRAPS) PRODUCT_RETURN;
482
483 static void dump_methods() PRODUCT_RETURN;
484
485 public:
486 VM_RedefineClasses(jint class_count,
487 const jvmtiClassDefinition *class_defs,
488 JvmtiClassLoadKind class_load_kind);
489 VMOp_Type type() const { return VMOp_RedefineClasses; }
490 bool doit_prologue();
491 void doit();
492 void doit_epilogue();
493
494 bool allow_nested_vm_operations() const { return true; }
495 jvmtiError check_error() { return _res; }
496
497 // Modifiable test must be shared between IsModifiableClass query
498 // and redefine implementation
499 static bool is_modifiable_class(oop klass_mirror);
500 };
501
502 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP
|
1 /*
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.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
461 bool rewrite_cp_refs_in_fields_annotations(
462 instanceKlassHandle scratch_class, TRAPS);
463 void rewrite_cp_refs_in_method(methodHandle method,
464 methodHandle * new_method_p, TRAPS);
465 bool rewrite_cp_refs_in_methods(instanceKlassHandle scratch_class, TRAPS);
466 bool rewrite_cp_refs_in_methods_annotations(
467 instanceKlassHandle scratch_class, TRAPS);
468 bool rewrite_cp_refs_in_methods_default_annotations(
469 instanceKlassHandle scratch_class, TRAPS);
470 bool rewrite_cp_refs_in_methods_parameter_annotations(
471 instanceKlassHandle scratch_class, TRAPS);
472 void rewrite_cp_refs_in_stack_map_table(methodHandle method, TRAPS);
473 void rewrite_cp_refs_in_verification_type_info(
474 address& stackmap_addr_ref, address stackmap_end, u2 frame_i,
475 u1 frame_size, TRAPS);
476 void set_new_constant_pool(instanceKlassHandle scratch_class,
477 constantPoolHandle scratch_cp, int scratch_cp_length, bool shrink, TRAPS);
478
479 void flush_dependent_code(instanceKlassHandle k_h, TRAPS);
480
481 static void check_class(klassOop k_oop, oop initiating_loader, TRAPS);
482 static void dump_methods();
483
484 public:
485 VM_RedefineClasses(jint class_count,
486 const jvmtiClassDefinition *class_defs,
487 JvmtiClassLoadKind class_load_kind);
488 VMOp_Type type() const { return VMOp_RedefineClasses; }
489 bool doit_prologue();
490 void doit();
491 void doit_epilogue();
492
493 bool allow_nested_vm_operations() const { return true; }
494 jvmtiError check_error() { return _res; }
495
496 // Modifiable test must be shared between IsModifiableClass query
497 // and redefine implementation
498 static bool is_modifiable_class(oop klass_mirror);
499 };
500
501 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP
|