instanceKlass.inline.hpp (10606:24c6f885d316) instanceKlass.inline.hpp (11910:24d88ded4cb6)
1/*
2 * Copyright (c) 2015, 2016, 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 *

--- 15 unchanged lines hidden (view full) ---

24
25#ifndef SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
26#define SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
27
28#include "memory/iterator.hpp"
29#include "oops/instanceKlass.hpp"
30#include "oops/klass.hpp"
31#include "oops/oop.inline.hpp"
1/*
2 * Copyright (c) 2015, 2016, 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 *

--- 15 unchanged lines hidden (view full) ---

24
25#ifndef SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
26#define SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
27
28#include "memory/iterator.hpp"
29#include "oops/instanceKlass.hpp"
30#include "oops/klass.hpp"
31#include "oops/oop.inline.hpp"
32#include "runtime/orderAccess.inline.hpp"
32#include "utilities/debug.hpp"
33#include "utilities/globalDefinitions.hpp"
34#include "utilities/macros.hpp"
35
33#include "utilities/debug.hpp"
34#include "utilities/globalDefinitions.hpp"
35#include "utilities/macros.hpp"
36
37inline Klass* InstanceKlass::array_klasses_acquire() const {
38 return (Klass*) OrderAccess::load_ptr_acquire(&_array_klasses);
39}
40
41inline void InstanceKlass::release_set_array_klasses(Klass* k) {
42 OrderAccess::release_store_ptr(&_array_klasses, k);
43}
44
45inline jmethodID* InstanceKlass::methods_jmethod_ids_acquire() const {
46 return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids);
47}
48
49inline void InstanceKlass::release_set_methods_jmethod_ids(jmethodID* jmeths) {
50 OrderAccess::release_store_ptr(&_methods_jmethod_ids, jmeths);
51}
52
36// The iteration over the oops in objects is a hot path in the GC code.
37// By force inlining the following functions, we get similar GC performance
38// as the previous macro based implementation.
39
40template <bool nv, typename T, class OopClosureType>
41ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure) {
42 T* p = (T*)obj->obj_field_addr<T>(map->offset());
43 T* const end = p + map->count();

--- 146 unchanged lines hidden ---
53// The iteration over the oops in objects is a hot path in the GC code.
54// By force inlining the following functions, we get similar GC performance
55// as the previous macro based implementation.
56
57template <bool nv, typename T, class OopClosureType>
58ALWAYSINLINE void InstanceKlass::oop_oop_iterate_oop_map(OopMapBlock* map, oop obj, OopClosureType* closure) {
59 T* p = (T*)obj->obj_field_addr<T>(map->offset());
60 T* const end = p + map->count();

--- 146 unchanged lines hidden ---