hotspot/src/share/vm/runtime/java.hpp
changeset 7900 4c7fc6332f7e
parent 7397 5b173b4ca846
child 8076 96d498ec7ae1
equal deleted inserted replaced
7899:b627d55dd419 7900:4c7fc6332f7e
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2011, 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.
    90   // If partially initialized, the above fields are invalid and we know
    90   // If partially initialized, the above fields are invalid and we know
    91   // that we're less than major version 6.
    91   // that we're less than major version 6.
    92   bool _partially_initialized;
    92   bool _partially_initialized;
    93 
    93 
    94   bool _thread_park_blocker;
    94   bool _thread_park_blocker;
       
    95   bool _post_vm_init_hook_enabled;
    95 
    96 
    96   bool is_valid() const {
    97   bool is_valid() const {
    97     return (_major != 0 || _partially_initialized);
    98     return (_major != 0 || _partially_initialized);
    98   }
    99   }
    99 
   100 
   111     return _current._partially_initialized;
   112     return _current._partially_initialized;
   112   }
   113   }
   113 
   114 
   114   JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
   115   JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
   115                   _special(0), _build(0), _partially_initialized(false),
   116                   _special(0), _build(0), _partially_initialized(false),
   116                   _thread_park_blocker(false) {}
   117                   _thread_park_blocker(false), _post_vm_init_hook_enabled(false) {}
   117 
   118 
   118   JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
   119   JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
   119               uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
   120               uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
   120               bool thread_park_blocker = false) :
   121               bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) :
   121       _major(major), _minor(minor), _micro(micro), _update(update),
   122       _major(major), _minor(minor), _micro(micro), _update(update),
   122       _special(special), _build(build), _partially_initialized(false),
   123       _special(special), _build(build), _partially_initialized(false),
   123       _thread_park_blocker(thread_park_blocker) {}
   124       _thread_park_blocker(thread_park_blocker),
       
   125       _post_vm_init_hook_enabled(post_vm_init_hook_enabled) {}
   124 
   126 
   125   // Returns the current running JDK version
   127   // Returns the current running JDK version
   126   static JDK_Version current() { return _current; }
   128   static JDK_Version current() { return _current; }
   127 
   129 
   128   // Factory methods for convenience
   130   // Factory methods for convenience
   141   uint8_t special_update_version() const { return _special; }
   143   uint8_t special_update_version() const { return _special; }
   142   uint8_t build_number() const           { return _build; }
   144   uint8_t build_number() const           { return _build; }
   143 
   145 
   144   bool supports_thread_park_blocker() const {
   146   bool supports_thread_park_blocker() const {
   145     return _thread_park_blocker;
   147     return _thread_park_blocker;
       
   148   }
       
   149   bool post_vm_init_hook_enabled() const {
       
   150     return _post_vm_init_hook_enabled;
   146   }
   151   }
   147 
   152 
   148   // Performs a full ordering comparison using all fields (update, build, etc.)
   153   // Performs a full ordering comparison using all fields (update, build, etc.)
   149   int compare(const JDK_Version& other) const;
   154   int compare(const JDK_Version& other) const;
   150 
   155