src/share/vm/runtime/vm_version.cpp

Print this page
rev 3024 : 7132779: build-infra merge: Enable ccache to work for most developer builds.
Summary: When a build number is not specified, the JRE_RELEASE_VERSION define contains a date and timestamp. Thus ccache cannot cache the object files for longer than a minute since the define is passed to the compilation of all source files. This change passes JRE_RELEASE_VERSION only to vm_version.cpp and adds a function jre_release_version() to Abstract_VM_Version. This allows all other source files to be ccached.
Reviewed-by: ohair, rottenha
Contributed-by: fredrik.ohrstrom@oracle.com


 148 const char* Abstract_VM_Version::vm_info_string() {
 149   switch (Arguments::mode()) {
 150     case Arguments::_int:
 151       return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode";
 152     case Arguments::_mixed:
 153       return UseSharedSpaces ? "mixed mode, sharing"       :  "mixed mode";
 154     case Arguments::_comp:
 155       return UseSharedSpaces ? "compiled mode, sharing"    : "compiled mode";
 156   };
 157   ShouldNotReachHere();
 158   return "";
 159 }
 160 
 161 // NOTE: do *not* use stringStream. this function is called by
 162 //       fatal error handler. if the crash is in native thread,
 163 //       stringStream cannot get resource allocated and will SEGV.
 164 const char* Abstract_VM_Version::vm_release() {
 165   return VM_RELEASE;
 166 }
 167 







 168 #define OS       LINUX_ONLY("linux")             \
 169                  WINDOWS_ONLY("windows")         \
 170                  SOLARIS_ONLY("solaris")         \
 171                  BSD_ONLY("bsd")
 172 
 173 #ifdef ZERO
 174 #define CPU      ZERO_LIBARCH
 175 #else
 176 #define CPU      IA32_ONLY("x86")                \
 177                  IA64_ONLY("ia64")               \
 178                  AMD64_ONLY("amd64")             \
 179                  ARM_ONLY("arm")                 \
 180                  PPC_ONLY("ppc")                 \
 181                  SPARC_ONLY("sparc")
 182 #endif // ZERO
 183 
 184 const char *Abstract_VM_Version::vm_platform_string() {
 185   return OS "-" CPU;
 186 }
 187 




 148 const char* Abstract_VM_Version::vm_info_string() {
 149   switch (Arguments::mode()) {
 150     case Arguments::_int:
 151       return UseSharedSpaces ? "interpreted mode, sharing" : "interpreted mode";
 152     case Arguments::_mixed:
 153       return UseSharedSpaces ? "mixed mode, sharing"       :  "mixed mode";
 154     case Arguments::_comp:
 155       return UseSharedSpaces ? "compiled mode, sharing"    : "compiled mode";
 156   };
 157   ShouldNotReachHere();
 158   return "";
 159 }
 160 
 161 // NOTE: do *not* use stringStream. this function is called by
 162 //       fatal error handler. if the crash is in native thread,
 163 //       stringStream cannot get resource allocated and will SEGV.
 164 const char* Abstract_VM_Version::vm_release() {
 165   return VM_RELEASE;
 166 }
 167 
 168 // NOTE: do *not* use stringStream. this function is called by
 169 //       fatal error handlers. if the crash is in native thread,
 170 //       stringStream cannot get resource allocated and will SEGV.
 171 const char* Abstract_VM_Version::jre_release_version() {
 172   return JRE_RELEASE_VERSION;
 173 }
 174 
 175 #define OS       LINUX_ONLY("linux")             \
 176                  WINDOWS_ONLY("windows")         \
 177                  SOLARIS_ONLY("solaris")         \
 178                  BSD_ONLY("bsd")
 179 
 180 #ifdef ZERO
 181 #define CPU      ZERO_LIBARCH
 182 #else
 183 #define CPU      IA32_ONLY("x86")                \
 184                  IA64_ONLY("ia64")               \
 185                  AMD64_ONLY("amd64")             \
 186                  ARM_ONLY("arm")                 \
 187                  PPC_ONLY("ppc")                 \
 188                  SPARC_ONLY("sparc")
 189 #endif // ZERO
 190 
 191 const char *Abstract_VM_Version::vm_platform_string() {
 192   return OS "-" CPU;
 193 }
 194