Mercurial > hg > truffle
comparison src/share/vm/classfile/systemDictionary.hpp @ 4864:b2cd0ee8f778
7114376: Make system dictionary hashtable bucket array size configurable
Summary: 7u4 new experimental flag -XX:PredictedClassLoadedCount=#
Reviewed-by: dholmes, phh, dcubed
author | acorn |
---|---|
date | Mon, 30 Jan 2012 23:27:30 -0500 |
parents | e6b1331a51d2 |
children | 33df1aeaebbf 8b0a4867acf0 |
comparison
equal
deleted
inserted
replaced
4863:d96c130c9399 | 4864:b2cd0ee8f778 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, 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. |
343 static void placeholders_do(OopClosure* blk); | 343 static void placeholders_do(OopClosure* blk); |
344 | 344 |
345 // Unload (that is, break root links to) all unmarked classes and | 345 // Unload (that is, break root links to) all unmarked classes and |
346 // loaders. Returns "true" iff something was unloaded. | 346 // loaders. Returns "true" iff something was unloaded. |
347 static bool do_unloading(BoolObjectClosure* is_alive); | 347 static bool do_unloading(BoolObjectClosure* is_alive); |
348 | |
349 static int calculate_systemdictionary_size(int loadedclasses); | |
348 | 350 |
349 // Applies "f->do_oop" to all root oops in the system dictionary. | 351 // Applies "f->do_oop" to all root oops in the system dictionary. |
350 static void oops_do(OopClosure* f); | 352 static void oops_do(OopClosure* f); |
351 | 353 |
352 // System loader lock | 354 // System loader lock |
536 | 538 |
537 enum Constants { | 539 enum Constants { |
538 _loader_constraint_size = 107, // number of entries in constraint table | 540 _loader_constraint_size = 107, // number of entries in constraint table |
539 _resolution_error_size = 107, // number of entries in resolution error table | 541 _resolution_error_size = 107, // number of entries in resolution error table |
540 _invoke_method_size = 139, // number of entries in invoke method table | 542 _invoke_method_size = 139, // number of entries in invoke method table |
541 _nof_buckets = 1009 // number of buckets in hash table | 543 _nof_buckets = 1009, // number of buckets in hash table for placeholders |
544 _old_default_sdsize = 1009, // backward compat for system dictionary size | |
545 _prime_array_size = 8, // array of primes for system dictionary size | |
546 _average_depth_goal = 3 // goal for lookup length | |
542 }; | 547 }; |
543 | 548 |
544 | 549 |
545 // Static variables | 550 // Static variables |
551 | |
552 // hashtable sizes for system dictionary to allow growth | |
553 // prime numbers for system dictionary size | |
554 static int _sdgeneration; | |
555 static const int _primelist[_prime_array_size]; | |
546 | 556 |
547 // Hashtable holding loaded classes. | 557 // Hashtable holding loaded classes. |
548 static Dictionary* _dictionary; | 558 static Dictionary* _dictionary; |
549 | 559 |
550 // Hashtable holding placeholders for classes being loaded. | 560 // Hashtable holding placeholders for classes being loaded. |