Print this page
rev 6314 : 8030011: Update Hotspot version string output
Reviewed-by: dholmes, jcoomes, kvn

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/prims/jvm.h
          +++ new/src/share/vm/prims/jvm.h
↓ open down ↓ 1545 lines elided ↑ open up ↑
1546 1546   * JVM to query for the JDK version and capabilities.
1547 1547   *
1548 1548   * When a new bit is added, the following should be updated to provide
1549 1549   * access to the new capability:
1550 1550   *    HS:   JDK_Version class
1551 1551   *    SDK:  JDK_GetVersionInfo0
1552 1552   *
1553 1553   * ==========================================================================
1554 1554   */
1555 1555  typedef struct {
1556      -    /* HotSpot Express VM version string:
1557      -     * <major>.<minor>-bxx[-<identifier>][-<debug_flavor>]
1558      -     */
1559      -    unsigned int jvm_version; /* Consists of major.minor.0.build */
1560      -    unsigned int update_version : 8;         /* 0 in HotSpot Express VM */
1561      -    unsigned int special_update_version : 8; /* 0 in HotSpot Express VM */
     1556 +    /* VM version string: follows the JDK release version naming convention    */
     1557 +    unsigned int jvm_version; /* <major_ver>.<minor_ver>.<micro_ver>[-<identifier>][-<debug_target>][-b<nn>]  */
     1558 +    unsigned int update_version : 8;
     1559 +    unsigned int special_update_version : 8;
1562 1560      unsigned int reserved1 : 16;
1563 1561      unsigned int reserved2;
1564 1562  
1565 1563      /* The following bits represents JVM supports that JDK has dependency on.
1566 1564       * JDK can use these bits to determine which JVM version
1567 1565       * and support it has to maintain runtime compatibility.
1568 1566       *
1569 1567       * When a new bit is added in a minor or update release, make sure
1570 1568       * the new bit is also added in the main/baseline.
1571 1569       */
1572 1570      unsigned int is_attachable : 1;
1573 1571      unsigned int : 31;
1574 1572      unsigned int : 32;
1575 1573      unsigned int : 32;
1576 1574  } jvm_version_info;
1577 1575  
1578 1576  #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
1579 1577  #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
1580      -// Micro version is 0 in HotSpot Express VM (set in jvm.cpp).
1581 1578  #define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
1582      -/* Build number is available in all HotSpot Express VM builds.
1583      - * It is defined in make/hotspot_version file.
1584      - */
1585 1579  #define JVM_VERSION_BUILD(version) ((version & 0x000000FF))
1586 1580  
1587 1581  JNIEXPORT void JNICALL
1588 1582  JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
1589 1583  
1590 1584  typedef struct {
1591 1585      // Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx
1592 1586      unsigned int jdk_version;   /* Consists of major, minor, micro (n.n.n) */
1593 1587                                  /* and build number (xx) */
1594 1588      unsigned int update_version : 8;         /* Update release version (uu) */
↓ open down ↓ 71 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX