< prev index next >

src/hotspot/share/memory/universe.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 447   // Reserve Java heap and determine CompressedOops mode
 448   static ReservedSpace reserve_heap(size_t heap_size, size_t alignment);
 449 
 450   // Historic gc information
 451   static size_t get_heap_capacity_at_last_gc()         { return _heap_capacity_at_last_gc; }
 452   static size_t get_heap_free_at_last_gc()             { return _heap_capacity_at_last_gc - _heap_used_at_last_gc; }
 453   static size_t get_heap_used_at_last_gc()             { return _heap_used_at_last_gc; }
 454   static void update_heap_info_at_gc();
 455 
 456   // Testers
 457   static bool is_bootstrapping()                      { return _bootstrapping; }
 458   static bool is_module_initialized()                 { return _module_initialized; }
 459   static bool is_fully_initialized()                  { return _fully_initialized; }
 460 
 461   static inline bool element_type_should_be_aligned(BasicType type);
 462   static inline bool field_type_should_be_aligned(BasicType type);
 463   static bool        on_page_boundary(void* addr);
 464   static bool        should_fill_in_stack_trace(Handle throwable);
 465   static void check_alignment(uintx size, uintx alignment, const char* name);
 466 
 467   // Finalizer support.
 468   static void run_finalizers_on_exit();
 469 
 470   // Iteration
 471 
 472   // Apply "f" to the addresses of all the direct heap pointers maintained
 473   // as static fields of "Universe".
 474   static void oops_do(OopClosure* f, bool do_all = false);
 475 
 476   // CDS support
 477   static void serialize(SerializeClosure* f, bool do_all = false);
 478 
 479   // Apply "f" to all klasses for basic types (classes not present in
 480   // SystemDictionary).
 481   static void basic_type_classes_do(void f(Klass*));
 482   static void metaspace_pointers_do(MetaspaceClosure* it);
 483 
 484   // Debugging
 485   enum VERIFY_FLAGS {
 486     Verify_Threads = 1,
 487     Verify_Heap = 2,
 488     Verify_SymbolTable = 4,
 489     Verify_StringTable = 8,


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 447   // Reserve Java heap and determine CompressedOops mode
 448   static ReservedSpace reserve_heap(size_t heap_size, size_t alignment);
 449 
 450   // Historic gc information
 451   static size_t get_heap_capacity_at_last_gc()         { return _heap_capacity_at_last_gc; }
 452   static size_t get_heap_free_at_last_gc()             { return _heap_capacity_at_last_gc - _heap_used_at_last_gc; }
 453   static size_t get_heap_used_at_last_gc()             { return _heap_used_at_last_gc; }
 454   static void update_heap_info_at_gc();
 455 
 456   // Testers
 457   static bool is_bootstrapping()                      { return _bootstrapping; }
 458   static bool is_module_initialized()                 { return _module_initialized; }
 459   static bool is_fully_initialized()                  { return _fully_initialized; }
 460 
 461   static inline bool element_type_should_be_aligned(BasicType type);
 462   static inline bool field_type_should_be_aligned(BasicType type);
 463   static bool        on_page_boundary(void* addr);
 464   static bool        should_fill_in_stack_trace(Handle throwable);
 465   static void check_alignment(uintx size, uintx alignment, const char* name);
 466 



 467   // Iteration
 468 
 469   // Apply "f" to the addresses of all the direct heap pointers maintained
 470   // as static fields of "Universe".
 471   static void oops_do(OopClosure* f, bool do_all = false);
 472 
 473   // CDS support
 474   static void serialize(SerializeClosure* f, bool do_all = false);
 475 
 476   // Apply "f" to all klasses for basic types (classes not present in
 477   // SystemDictionary).
 478   static void basic_type_classes_do(void f(Klass*));
 479   static void metaspace_pointers_do(MetaspaceClosure* it);
 480 
 481   // Debugging
 482   enum VERIFY_FLAGS {
 483     Verify_Threads = 1,
 484     Verify_Heap = 2,
 485     Verify_SymbolTable = 4,
 486     Verify_StringTable = 8,


< prev index next >