Index: src/common/gc_common.h =================================================================== --- src/common/gc_common.h (revision 548275) +++ src/common/gc_common.h (working copy) @@ -22,7 +22,6 @@ #define _GC_COMMON_H_ #include "port_vmem.h" -#include "port_threadunsafe.h" /* to mark unsafe region (race but correct) */ #include "platform_lowlevel.h" @@ -173,11 +172,7 @@ { return ref_to_obj_ptr(*p_slot); } FORCE_INLINE void write_slot(REF *p_slot, Partial_Reveal_Object *p_obj) -{ - UNSAFE_REGION_START - *p_slot = obj_ptr_to_ref(p_obj); - UNSAFE_REGION_END -} +{ *p_slot = obj_ptr_to_ref(p_obj); } inline POINTER_SIZE_INT round_up_to_size(POINTER_SIZE_INT size, int block_size) Index: src/common/gc_for_vm.cpp =================================================================== --- src/common/gc_for_vm.cpp (revision 548275) +++ src/common/gc_for_vm.cpp (working copy) @@ -296,9 +296,7 @@ Boolean gc_clear_mutator_block_flag() { - UNSAFE_REGION_START Boolean old_flag = mutator_need_block; mutator_need_block = FALSE; - UNSAFE_REGION_END return old_flag; } Index: src/common/hashcode.h =================================================================== --- src/common/hashcode.h (revision 548275) +++ src/common/hashcode.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _HASHCODE_H_ #define _HASHCODE_H_ Index: src/finalizer_weakref/finalizer_weakref_metadata.cpp =================================================================== --- src/finalizer_weakref/finalizer_weakref_metadata.cpp (revision 548275) +++ src/finalizer_weakref/finalizer_weakref_metadata.cpp (working copy) @@ -203,11 +203,9 @@ assert(collector->softref_set == NULL); assert(collector->weakref_set == NULL); assert(collector->phanref_set == NULL); - UNSAFE_REGION_START collector->softref_set = finref_get_free_block(gc); collector->weakref_set = finref_get_free_block(gc); collector->phanref_set= finref_get_free_block(gc); - UNSAFE_REGION_END } /* put back last weak references block of each collector */ @@ -219,14 +217,12 @@ for(unsigned int i = 0; i < num_active_collectors; i++) { Collector* collector = gc->collectors[i]; - UNSAFE_REGION_START pool_put_entry(metadata->softref_pool, collector->softref_set); pool_put_entry(metadata->weakref_pool, collector->weakref_set); pool_put_entry(metadata->phanref_pool, collector->phanref_set); collector->softref_set = NULL; collector->weakref_set= NULL; collector->phanref_set= NULL; - UNSAFE_REGION_END } return; } Index: src/jni/java_natives.cpp =================================================================== --- src/jni/java_natives.cpp (revision 548275) +++ src/jni/java_natives.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include "open/vm_util.h" Index: src/mark_compact/mspace_alloc.cpp =================================================================== --- src/mark_compact/mspace_alloc.cpp (revision 548275) +++ src/mark_compact/mspace_alloc.cpp (working copy) @@ -36,9 +36,7 @@ } /* ok, got one */ Block_Header* alloc_block = (Block_Header*)&(mspace->blocks[allocated_idx - mspace->first_block_idx]); - UNSAFE_REGION_START mspace->alloced_size += GC_BLOCK_SIZE_BYTES; - UNSAFE_REGION_END allocator_init_free_block(allocator, alloc_block); @@ -77,4 +75,3 @@ return p_return; } - Index: src/tests/ThreadSim.java =================================================================== --- src/tests/ThreadSim.java (revision 548275) +++ src/tests/ThreadSim.java (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + class Small { private int i, j; Index: src/thread/collector_alloc.h =================================================================== --- src/thread/collector_alloc.h (revision 548275) +++ src/thread/collector_alloc.h (working copy) @@ -22,8 +22,6 @@ #define _COLLECTOR_ALLOC_H_ #include "gc_thread.h" -#include "port_threadunsafe.h" - #ifdef USE_32BITS_HASHCODE #include "../common/hashcode.h" #endif @@ -72,14 +70,10 @@ #ifdef USE_32BITS_HASHCODE if(obj_is_set_hashcode){ - UNSAFE_REGION_START memcpy(p_targ_obj, p_obj, size-GC_OBJECT_ALIGNMENT); - UNSAFE_REGION_END oi = trace_forward_process_hashcode(p_targ_obj, p_obj ,oi, size); }else{ - UNSAFE_REGION_START memcpy(p_targ_obj, p_obj, size); - UNSAFE_REGION_END } #else memcpy(p_targ_obj, p_obj, size); Index: src/utils/seq_list.h =================================================================== --- src/utils/seq_list.h (revision 548275) +++ src/utils/seq_list.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _SEQ_LIST_H_ #define _SEQ_LIST_H_ Index: src/utils/sync_stack.h =================================================================== --- src/utils/sync_stack.h (revision 548275) +++ src/utils/sync_stack.h (working copy) @@ -18,7 +18,6 @@ * @author Xiao-Feng Li, 2006/10/25 */ -#include "port_threadunsafe.h" #ifndef _SYNC_STACK_H_ #define _SYNC_STACK_H_ @@ -109,9 +108,7 @@ POINTER_SIZE_INT temp = stack_top_contruct(top_entry->next, version); temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top); if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it - UNSAFE_REGION_START top_entry->next = NULL; - UNSAFE_REGION_END return top_entry; } cur_top = stack->top; @@ -124,9 +121,7 @@ inline Boolean sync_stack_push(Sync_Stack* stack, Node* node) { Stack_Top cur_top = stack->top; - UNSAFE_REGION_START node->next = stack_top_get_entry(cur_top); - UNSAFE_REGION_END POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top); POINTER_SIZE_INT temp = stack_top_contruct(node, new_version); Index: src/utils/vector_block.h =================================================================== --- src/utils/vector_block.h (revision 548275) +++ src/utils/vector_block.h (working copy) @@ -20,7 +20,6 @@ #ifndef _VECTOR_BLOCK_H_ #define _VECTOR_BLOCK_H_ -#include "port_threadunsafe.h" typedef struct Vector_Block{ void* next; /* point to next block */ @@ -100,20 +99,16 @@ /* Below is to use Vector_Block as stack (for trace-forwarding DFS order ) */ inline void vector_stack_init(Vector_Block* block) { - UNSAFE_REGION_START block->tail = block->heap_end; - block->head = block->heap_end; - UNSAFE_REGION_END + block->head = block->heap_end; } inline void vector_stack_clear(Vector_Block* block) { - UNSAFE_REGION_START vector_stack_init(block); #ifdef _DEBUG memset(block->entries, 0, (POINTER_SIZE_INT)block->heap_end - (POINTER_SIZE_INT)block->entries); #endif - UNSAFE_REGION_END } inline Boolean vector_stack_is_empty(Vector_Block* block) @@ -129,13 +124,11 @@ inline void vector_stack_push(Vector_Block* block, POINTER_SIZE_INT value) { - UNSAFE_REGION_START block->head--; #ifdef _DEBUG assert(value && !*(block->head)); #endif *(block->head) = value; - UNSAFE_REGION_END } inline POINTER_SIZE_INT vector_stack_pop(Vector_Block* block) Index: src/verify/verifier_common.cpp =================================================================== --- src/verify/verifier_common.cpp (revision 548275) +++ src/verify/verifier_common.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verifier_common.h" #include "verify_gc_effect.h" #include "verify_mutator_effect.h" @@ -237,4 +253,3 @@ printf(" %-14s: %-7s | Before %10d | After %10d |\n", "hashcode", "NUM", gc_verifier->num_hash_before_gc, gc_verifier->num_hash_after_gc); } - Index: src/verify/verifier_common.h =================================================================== --- src/verify/verifier_common.h (revision 548275) +++ src/verify/verifier_common.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _VERIFIER_COMMON_H_ #define _VERIFIER_COMMON_H_ #include "verify_live_heap.h" Index: src/verify/verifier_metadata.cpp =================================================================== --- src/verify/verifier_metadata.cpp (revision 548275) +++ src/verify/verifier_metadata.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verifier_metadata.h" #include "verifier_common.h" Index: src/verify/verifier_metadata.h =================================================================== --- src/verify/verifier_metadata.h (revision 548275) +++ src/verify/verifier_metadata.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _VERIFY_METADATA_H_ #define _VERIFY_METADATA_H_ Index: src/verify/verifier_scanner.cpp =================================================================== --- src/verify/verifier_scanner.cpp (revision 548275) +++ src/verify/verifier_scanner.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verify_live_heap.h" #include "verifier_common.h" #include "verify_gc_effect.h" @@ -402,4 +418,3 @@ - Index: src/verify/verify_gc_effect.cpp =================================================================== --- src/verify/verify_gc_effect.cpp (revision 548275) +++ src/verify/verify_gc_effect.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verifier_common.h" #include "verify_gc_effect.h" @@ -98,7 +114,7 @@ unsigned int i = 0; for(; iref_slot[i] = p_obj==NULL? (VT)NULL: obj_get_vt_raw(p_obj); + p_obj_information->ref_slot[i] = p_obj==NULL? (VT)NULL: obj_get_vt(p_obj); } return p_obj_information; }else{ @@ -114,7 +130,7 @@ for(; iref_slot[i] = p_obj == NULL? (VT)NULL: obj_get_vt_raw(p_obj); + p_obj_information->ref_slot[i] = p_obj == NULL? (VT)NULL: obj_get_vt(p_obj); } return p_obj_information; } @@ -512,4 +528,3 @@ - Index: src/verify/verify_gc_effect.h =================================================================== --- src/verify/verify_gc_effect.h (revision 548275) +++ src/verify/verify_gc_effect.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _VERIFY_GC_EFFECT_H_ #define _VERIFY_GC_EFFECT_H_ @@ -81,4 +97,3 @@ #endif - Index: src/verify/verify_live_heap.cpp =================================================================== --- src/verify/verify_live_heap.cpp (revision 548275) +++ src/verify/verify_live_heap.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verify_live_heap.h" #include "verifier_common.h" #include "verify_gc_effect.h" @@ -131,4 +147,3 @@ - Index: src/verify/verify_live_heap.h =================================================================== --- src/verify/verify_live_heap.h (revision 548275) +++ src/verify/verify_live_heap.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _VERIFY_LIVE_HEAP_H_ #define _VERIFY_LIVE_HEAP_H_ Index: src/verify/verify_mutator_effect.cpp =================================================================== --- src/verify/verify_mutator_effect.cpp (revision 548275) +++ src/verify/verify_mutator_effect.cpp (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "verifier_common.h" #include "verify_mutator_effect.h" @@ -417,4 +433,3 @@ - Index: src/verify/verify_mutator_effect.h =================================================================== --- src/verify/verify_mutator_effect.h (revision 548275) +++ src/verify/verify_mutator_effect.h (working copy) @@ -1,3 +1,19 @@ +/* + * Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _VERIFY_MUTATOR_EFFECT_H_ #define _VERIFY_MUTATOR_EFFECT_H_