1 /* |
1 /* |
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 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. |
93 |
93 |
94 void |
94 void |
95 G1SATBCardTableLoggingModRefBS::write_ref_field_static(void* field, |
95 G1SATBCardTableLoggingModRefBS::write_ref_field_static(void* field, |
96 oop new_val) { |
96 oop new_val) { |
97 uintptr_t field_uint = (uintptr_t)field; |
97 uintptr_t field_uint = (uintptr_t)field; |
98 uintptr_t new_val_uint = (uintptr_t)new_val; |
98 uintptr_t new_val_uint = cast_from_oop<uintptr_t>(new_val); |
99 uintptr_t comb = field_uint ^ new_val_uint; |
99 uintptr_t comb = field_uint ^ new_val_uint; |
100 comb = comb >> HeapRegion::LogOfHRGrainBytes; |
100 comb = comb >> HeapRegion::LogOfHRGrainBytes; |
101 if (comb == 0) return; |
101 if (comb == 0) return; |
102 if (new_val == NULL) return; |
102 if (new_val == NULL) return; |
103 // Otherwise, log it. |
103 // Otherwise, log it. |