Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/barrierSet.hpp @ 2324:0ac769a57c64
6627983: G1: Bad oop deference during marking
Summary: Bulk zeroing reduction didn't work with G1, because arraycopy would call pre-barriers on uninitialized oops. The solution is to have version of arraycopy stubs that don't have pre-barriers. Also refactored arraycopy stubs generation on SPARC to be more readable and reduced the number of stubs necessary in some cases.
Reviewed-by: jrose, kvn, never
author | iveresov |
---|---|
date | Tue, 01 Mar 2011 14:56:48 -0800 |
parents | f95d63e2154a |
children | fd09f2d8283e |
comparison
equal
deleted
inserted
replaced
2323:bc6b27fb3568 | 2324:0ac769a57c64 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2011, 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. |
42 G1SATBCTLogging, | 42 G1SATBCTLogging, |
43 Other, | 43 Other, |
44 Uninit | 44 Uninit |
45 }; | 45 }; |
46 | 46 |
47 enum Flags { | |
48 None = 0, | |
49 TargetUninitialized = 1 | |
50 }; | |
47 protected: | 51 protected: |
48 int _max_covered_regions; | 52 int _max_covered_regions; |
49 Name _kind; | 53 Name _kind; |
50 | 54 |
51 public: | 55 public: |
126 // barrier for an array whose elements are all in the given memory region. | 130 // barrier for an array whose elements are all in the given memory region. |
127 virtual void read_ref_array(MemRegion mr) = 0; | 131 virtual void read_ref_array(MemRegion mr) = 0; |
128 virtual void read_prim_array(MemRegion mr) = 0; | 132 virtual void read_prim_array(MemRegion mr) = 0; |
129 | 133 |
130 // Below length is the # array elements being written | 134 // Below length is the # array elements being written |
131 virtual void write_ref_array_pre( oop* dst, int length) {} | 135 virtual void write_ref_array_pre(oop* dst, int length, |
132 virtual void write_ref_array_pre(narrowOop* dst, int length) {} | 136 bool dest_uninitialized = false) {} |
137 virtual void write_ref_array_pre(narrowOop* dst, int length, | |
138 bool dest_uninitialized = false) {} | |
133 // Below count is the # array elements being written, starting | 139 // Below count is the # array elements being written, starting |
134 // at the address "start", which may not necessarily be HeapWord-aligned | 140 // at the address "start", which may not necessarily be HeapWord-aligned |
135 inline void write_ref_array(HeapWord* start, size_t count); | 141 inline void write_ref_array(HeapWord* start, size_t count); |
136 | 142 |
137 // Static versions, suitable for calling from generated code; | 143 // Static versions, suitable for calling from generated code; |