1.1 --- a/src/share/vm/classfile/symbolTable.hpp Fri Jun 14 08:02:32 2013 +0200 1.2 +++ b/src/share/vm/classfile/symbolTable.hpp Tue Jun 18 12:31:07 2013 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -246,12 +246,19 @@ 1.11 // Set if one bucket is out of balance due to hash algorithm deficiency 1.12 static bool _needs_rehashing; 1.13 1.14 + // Claimed high water mark for parallel chunked scanning 1.15 + static volatile int _parallel_claimed_idx; 1.16 + 1.17 static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS); 1.18 oop basic_add(int index, Handle string_or_null, jchar* name, int len, 1.19 unsigned int hashValue, TRAPS); 1.20 1.21 oop lookup(int index, jchar* chars, int length, unsigned int hashValue); 1.22 1.23 + // Apply the give oop closure to the entries to the buckets 1.24 + // in the range [start_idx, end_idx). 1.25 + static void buckets_do(OopClosure* f, int start_idx, int end_idx); 1.26 + 1.27 StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize, 1.28 sizeof (HashtableEntry<oop, mtSymbol>)) {} 1.29 1.30 @@ -277,9 +284,12 @@ 1.31 unlink_or_oops_do(cl, NULL); 1.32 } 1.33 1.34 - // Invoke "f->do_oop" on the locations of all oops in the table. 1.35 + // Serially invoke "f->do_oop" on the locations of all oops in the table. 1.36 static void oops_do(OopClosure* f); 1.37 1.38 + // Possibly parallel version of the above 1.39 + static void possibly_parallel_oops_do(OopClosure* f); 1.40 + 1.41 // Hashing algorithm, used as the hash value used by the 1.42 // StringTable for bucket selection and comparison (stored in the 1.43 // HashtableEntry structures). This is used in the String.intern() method. 1.44 @@ -315,5 +325,8 @@ 1.45 // Rehash the symbol table if it gets out of balance 1.46 static void rehash_table(); 1.47 static bool needs_rehashing() { return _needs_rehashing; } 1.48 + 1.49 + // Parallel chunked scanning 1.50 + static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; } 1.51 }; 1.52 #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP