Change the check for java version to exclude google versions.

This allows running with different versions of openjdk with
different version strings. In particular I have been running
with 1.8.0_152-release which forces me to change this file
locally when benchmarking.

R=tamaskenez@google.com

Change-Id: I26eb87777a81287dcb78a4966b65d047d9448741
diff --git a/tools/utils.py b/tools/utils.py
index 90e084b..47acca5 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -204,8 +204,7 @@
     print('{}-{}(CodeSize): {}'
         .format(prefix, segment_name, size))
 
-# ensure that java version is 1.8.*-internal,
-# as opposed to e.g. 1.7* or 1.8.*-google-v7
+# Ensure that we are not benchmarking with a google jvm.
 def check_java_version():
   cmd= ['java', '-version']
   output = subprocess.check_output(cmd, stderr = subprocess.STDOUT)
@@ -214,10 +213,9 @@
     raise Exception("Can't check java version: no version string in output"
         " of 'java -version': '{}'".format(output))
   version = m.groups(0)[0]
-  m = re.search('1[.]8[.].*-internal', version)
-  if m is None:
-    raise Exception("Incorrect java version, expected: '1.8.*-internal',"
-        " actual: {}".format(version))
+  m = re.search('google', version)
+  if m is not None:
+    raise Exception("Do not use google JVM for benchmarking: " + version)
 
 def verify_with_dex2oat(dex_file):