Mercurial > hg > truffle
comparison src/share/vm/classfile/systemDictionary.hpp @ 4988:eb5b24d1499f
Merge
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 15:06:36 -0800 |
parents | 33df1aeaebbf |
children | 5e9f38419819 |
comparison
equal
deleted
inserted
replaced
4987:f292f9c590ba | 4988:eb5b24d1499f |
---|---|
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. |
384 | 384 |
385 // Unload (that is, break root links to) all unmarked classes and | 385 // Unload (that is, break root links to) all unmarked classes and |
386 // loaders. Returns "true" iff something was unloaded. | 386 // loaders. Returns "true" iff something was unloaded. |
387 static bool do_unloading(BoolObjectClosure* is_alive); | 387 static bool do_unloading(BoolObjectClosure* is_alive); |
388 | 388 |
389 static int calculate_systemdictionary_size(int loadedclasses); | |
390 | |
389 // Applies "f->do_oop" to all root oops in the system dictionary. | 391 // Applies "f->do_oop" to all root oops in the system dictionary. |
390 static void oops_do(OopClosure* f); | 392 static void oops_do(OopClosure* f); |
391 | 393 |
392 // System loader lock | 394 // System loader lock |
393 static oop system_loader_lock() { return _system_loader_lock_obj; } | 395 static oop system_loader_lock() { return _system_loader_lock_obj; } |
576 | 578 |
577 enum Constants { | 579 enum Constants { |
578 _loader_constraint_size = 107, // number of entries in constraint table | 580 _loader_constraint_size = 107, // number of entries in constraint table |
579 _resolution_error_size = 107, // number of entries in resolution error table | 581 _resolution_error_size = 107, // number of entries in resolution error table |
580 _invoke_method_size = 139, // number of entries in invoke method table | 582 _invoke_method_size = 139, // number of entries in invoke method table |
581 _nof_buckets = 1009 // number of buckets in hash table | 583 _nof_buckets = 1009, // number of buckets in hash table for placeholders |
584 _old_default_sdsize = 1009, // backward compat for system dictionary size | |
585 _prime_array_size = 8, // array of primes for system dictionary size | |
586 _average_depth_goal = 3 // goal for lookup length | |
582 }; | 587 }; |
583 | 588 |
584 | 589 |
585 // Static variables | 590 // Static variables |
591 | |
592 // hashtable sizes for system dictionary to allow growth | |
593 // prime numbers for system dictionary size | |
594 static int _sdgeneration; | |
595 static const int _primelist[_prime_array_size]; | |
586 | 596 |
587 // Hashtable holding loaded classes. | 597 // Hashtable holding loaded classes. |
588 static Dictionary* _dictionary; | 598 static Dictionary* _dictionary; |
589 | 599 |
590 // Hashtable holding placeholders for classes being loaded. | 600 // Hashtable holding placeholders for classes being loaded. |