Re: RFR: 8252600: remove mx configuration [v2]

2021-04-18 Thread Doug Simon
On Sun, 18 Apr 2021 20:17:14 GMT, Doug Simon  wrote:

>> This PR removes the mx configuration files in the JDK as they do not really 
>> belong here. Instead, I've updated and moved them to 
>> https://github.com/dougxc/mx_jdk.
>
> Doug Simon has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   8252600: [JVMCI] remove mx configuration

On second thoughts, I concur with you Alan and am thus using this PR to remove 
the mx configuration files.

-

PR: https://git.openjdk.java.net/jdk/pull/3559


Re: RFR: 8252600: remove mx configuration [v2]

2021-04-18 Thread Doug Simon
> This PR updates the configuration files used to develop the JVMCI Java and 
> C++ sources with mx and Eclipse.

Doug Simon has refreshed the contents of this pull request, and previous 
commits have been removed. The incremental views will show differences compared 
to the previous content of the PR. The pull request contains one new commit 
since the last revision:

  8252600: [JVMCI] remove mx configuration

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3559/files
  - new: https://git.openjdk.java.net/jdk/pull/3559/files/7026605f..7c18d2d9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=3559=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=3559=00-01

  Stats: 754 lines in 8 files changed: 0 ins; 754 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3559.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3559/head:pull/3559

PR: https://git.openjdk.java.net/jdk/pull/3559


Re: RFR: 8265343: Update Debian-based cross-compilation recipes

2021-04-18 Thread John Paul Adrian Glaubitz
On Fri, 16 Apr 2021 11:57:32 GMT, Aleksey Shipilev  wrote:

> After [JDK-8257913](https://bugs.openjdk.java.net/browse/JDK-8257913), we do 
> not need to set a whole lot of options for cross-compiled builds. Docs should 
> be updated to reflect that fact. Also put in more configurations that are 
> buildable with Debian ports: these build routinely at 
> [builds.shipilev.net](https://builds.shipilev.net/openjdk-jdk/).
> 
> Maybe @glaubitz wants to chime in here too :)

@shipilev Nice work. I'll have a go at testing this next week. I didn't get to 
look this week as I was busy with my dayjob.

In any case, I'm very happy to see build instructions for so many architectures 
:-). I should also try to push some more Debian patches upstream so that most 
cross-builds will work out of the box.

-

PR: https://git.openjdk.java.net/jdk/pull/3545


RFR: 8265403: consolidate definition of CPU features

2021-04-18 Thread Doug Simon
While porting [JDK-8224974](https://bugs.openjdk.java.net/browse/JDK-8224974) 
to Graal, I noticed that new CPU features were defined for x86 and AArch64 
without being exposed via JVMCI. To avoid this problem in future, this PR 
updates x86 and AArch64 to define CPU features with a single macro that is used 
to generate enum declarations as well as vmstructs entries.

In addition, the JVMCI API is updated to exposes the new CPU feature constants 
and now has a check that ensure these constants are in sync with the underlying 
macro definition.

-

Commit messages:
 - 8265403: consolidate definition of CPU features

Changes: https://git.openjdk.java.net/jdk/pull/3558/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=3558=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8265403
  Stats: 481 lines in 15 files changed: 144 ins; 230 del; 107 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3558.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3558/head:pull/3558

PR: https://git.openjdk.java.net/jdk/pull/3558


Re: RFR: 8265403: consolidate definition of CPU features

2021-04-18 Thread Doug Simon
On Sat, 17 Apr 2021 20:18:31 GMT, Doug Simon  wrote:

> While porting [JDK-8224974](https://bugs.openjdk.java.net/browse/JDK-8224974) 
> to Graal, I noticed that new CPU features were defined for x86 and AArch64 
> without being exposed via JVMCI. To avoid this problem in future, this PR 
> updates x86 and AArch64 to define CPU features with a single macro that is 
> used to generate enum declarations as well as vmstructs entries.
> 
> In addition, the JVMCI API is updated to exposes the new CPU feature 
> constants and now has a check that ensure these constants are in sync with 
> the underlying macro definition.

src/hotspot/cpu/aarch64/vm_version_aarch64.cpp line 198:

> 196:   sprintf(buf, "0x%02x:0x%x:0x%03x:%d", _cpu, _variant, _model, 
> _revision);
> 197:   if (_model2) sprintf(buf+strlen(buf), "(0x%03x)", _model2);
> 198: #define ADD_FEATURE_IF_SUPPORTED(id, name, bit) if (_features & 
> CPU_##id) strcat(buf, ", " name);

I'm not sure why only some of the supported AArch64 CPU features were being 
added to `_features_string` but I assume there's no harm in adding them all.

src/hotspot/cpu/x86/vm_version_x86.hpp line 382:

> 380:   static const char* _features_names[];
> 381: 
> 382:   // NB! When adding new CPU feature detection consider updating 
> vmStructs_x86.hpp, vmStructs_jvmci.hpp, and 
> VM_Version::get_processor_features().

No need for this comment any more as the derivative declarations are now 
automatically kept up to date.

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java
 line 57:

> 55: 
> 56: Map constants = config.getStore().getConstants();
> 57: Function nameToFeature = name -> 
> name.equals("3DNOW_PREFETCH") ? CPUFeature.AMD_3DNOW_PREFETCH : 
> CPUFeature.valueOf(name);

The `AMD_3DNOW_PREFETCH` enum constant has to keep its old name to preserve 
backward compatibility.

-

PR: https://git.openjdk.java.net/jdk/pull/3558


Re: RFR: 8252600: [JVMCI] update JVMCI code style and mx configuration

2021-04-18 Thread Doug Simon
On Sat, 17 Apr 2021 20:37:08 GMT, Doug Simon  wrote:

> This PR updates the configuration files used to develop the JVMCI Java and 
> C++ sources with mx and Eclipse.

Until we have downstream repos for JDK 17, it's very handy to have this config 
in the JDK. I've tried to keep it only in JVMCI related directories so as to 
not perturb non-JVMCI sources. However, if the consensus is that this config 
does not belong in the JDK at all, I will repurpose this PR to remove all such 
config as it's current broken as is.

-

PR: https://git.openjdk.java.net/jdk/pull/3559


Re: RFR: 8252600: [JVMCI] update JVMCI code style and mx configuration

2021-04-18 Thread Alan Bateman
On Sat, 17 Apr 2021 20:37:08 GMT, Doug Simon  wrote:

> This PR updates the configuration files used to develop the JVMCI Java and 
> C++ sources with mx and Eclipse.

Are you sure it make sense to have this dev config in the openjdk/jdk repo? I 
would think this is something for the downstream Graal repos.

-

PR: https://git.openjdk.java.net/jdk/pull/3559