Mercurial > hg > graal-jvmci-8
comparison mx.jvmci/mx_jvmci.py @ 23352:3848113e3e6b
Update hsdis binaries
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 19 Apr 2016 23:28:22 -0700 |
parents | c8526451bb6b |
children | 24505bf61633 |
comparison
equal
deleted
inserted
replaced
23351:1c62a8bac25a | 23352:3848113e3e6b |
---|---|
544 for line in jvmCfgLines: | 544 for line in jvmCfgLines: |
545 fp.write(line) | 545 fp.write(line) |
546 | 546 |
547 # Install a copy of the disassembler library | 547 # Install a copy of the disassembler library |
548 try: | 548 try: |
549 hsdis([], copyToDir=vmLibDirInJdk(jdkDir)) | 549 hsdis_args = [] |
550 syntax = mx.get_env('HSDIS_SYNTAX') | |
551 if syntax: | |
552 hsdis_args = [syntax] | |
553 hsdis(hsdis_args, copyToDir=vmLibDirInJdk(jdkDir)) | |
550 except SystemExit: | 554 except SystemExit: |
551 pass | 555 pass |
552 else: | 556 else: |
553 if not exists(jdkDir): | 557 if not exists(jdkDir): |
554 if _installed_jdks: | 558 if _installed_jdks: |
1449 def hsdis(args, copyToDir=None): | 1453 def hsdis(args, copyToDir=None): |
1450 """download the hsdis library | 1454 """download the hsdis library |
1451 | 1455 |
1452 This is needed to support HotSpot's assembly dumping features. | 1456 This is needed to support HotSpot's assembly dumping features. |
1453 By default it downloads the Intel syntax version, use the 'att' argument to install AT&T syntax.""" | 1457 By default it downloads the Intel syntax version, use the 'att' argument to install AT&T syntax.""" |
1454 flavor = 'intel' | 1458 flavor = None |
1455 if 'att' in args: | 1459 if mx.get_arch() == "amd64": |
1456 flavor = 'att' | 1460 flavor = 'intel' |
1457 if mx.get_arch() == "sparcv9": | 1461 if 'att' in args: |
1458 flavor = "sparcv9" | 1462 flavor = 'att' |
1459 osSuffix = mx.get_os() + '-' | 1463 |
1464 libpattern = mx.add_lib_suffix('hsdis-' + mx.get_arch() + '-' + mx.get_os() + '-%s') | |
1465 | |
1466 sha1s = { | |
1467 'att/hsdis-amd64-windows-%s.dll' : 'bcbd535a9568b5075ab41e96205e26a2bac64f72', | |
1468 'att/hsdis-amd64-linux-%s.so' : '36a0b8e30fc370727920cc089f104bfb9cd508a0', | |
1469 'att/hsdis-amd64-darwin-%s.dylib' : 'c1865e9a58ca773fdc1c5eea0a4dfda213420ffb', | |
1470 'intel/hsdis-amd64-windows-%s.dll' : '6a388372cdd5fe905c1a26ced614334e405d1f30', | |
1471 'intel/hsdis-amd64-linux-%s.so' : '0d031013db9a80d6c88330c42c983fbfa7053193', | |
1472 'intel/hsdis-amd64-darwin-%s.dylib' : '67f6d23cbebd8998450a88b5bef362171f66f11a', | |
1473 'hsdis-sparcv9-solaris-%s.so': '970640a9af0bd63641f9063c11275b371a59ee60', | |
1474 'hsdis-sparcv9-linux-%s.so': '0c375986d727651dee1819308fbbc0de4927d5d9', | |
1475 } | |
1476 | |
1477 if flavor: | |
1478 flavoredLib = flavor + "/" + libpattern | |
1460 else: | 1479 else: |
1461 osSuffix = '' | 1480 flavoredLib = libpattern |
1462 lib = mx.add_lib_suffix('hsdis-' + osSuffix + mx.get_arch()) | 1481 if flavoredLib not in sha1s: |
1482 mx.warn("hsdis with flavor '{}' not supported on this plattform or architecture".format(flavor)) | |
1483 return | |
1484 | |
1485 sha1 = sha1s[flavoredLib] | |
1486 lib = flavoredLib % (sha1) | |
1463 path = join(_suite.get_output_root(), lib) | 1487 path = join(_suite.get_output_root(), lib) |
1464 | |
1465 sha1s = { | |
1466 'att/hsdis-amd64.dll' : 'bcbd535a9568b5075ab41e96205e26a2bac64f72', | |
1467 'att/hsdis-amd64.so' : '58919ba085d4ef7a513f25bae75e7e54ee73c049', | |
1468 'intel/hsdis-amd64.dll' : '6a388372cdd5fe905c1a26ced614334e405d1f30', | |
1469 'intel/hsdis-amd64.so' : '844ed9ffed64fe9599638f29a8450c50140e3192', | |
1470 'intel/hsdis-amd64.dylib' : 'fdb13ef0d7d23d93dacaae9c98837bea0d4fc5a2', | |
1471 'sparcv9/hsdis-solaris-sparcv9.so': '970640a9af0bd63641f9063c11275b371a59ee60', | |
1472 'sparcv9/hsdis-linux-sparcv9.so': '0c375986d727651dee1819308fbbc0de4927d5d9', | |
1473 } | |
1474 | |
1475 flavoredLib = flavor + "/" + lib | |
1476 if flavoredLib not in sha1s: | |
1477 mx.logv("hsdis not supported on this plattform or architecture") | |
1478 return | |
1479 | |
1480 if not exists(path): | 1488 if not exists(path): |
1481 sha1 = sha1s[flavoredLib] | |
1482 sha1path = path + '.sha1' | 1489 sha1path = path + '.sha1' |
1483 mx.download_file_with_sha1('hsdis', path, ['https://lafo.ssw.uni-linz.ac.at/pub/hsdis/' + flavoredLib], sha1, sha1path, True, True, sources=False) | 1490 mx.download_file_with_sha1('hsdis', path, ['https://lafo.ssw.uni-linz.ac.at/pub/hsdis/' + lib], sha1, sha1path, True, True, sources=False) |
1484 if copyToDir is not None and exists(copyToDir): | 1491 if copyToDir is not None and exists(copyToDir): |
1485 destFileName = mx.add_lib_suffix('hsdis-' + mx.get_arch()) | 1492 destFileName = mx.add_lib_suffix('hsdis-' + mx.get_arch()) |
1486 shutil.copy(path, copyToDir + os.sep + destFileName) | 1493 shutil.copy(path, copyToDir + os.sep + destFileName) |
1487 | 1494 |
1488 def hcfdis(args): | 1495 def hcfdis(args): |