Need help testing the EA builds

Volker Simonis volker.simonis at gmail.com
Mon Mar 7 18:23:40 UTC 2016


Hi Alan,

I think you're right. Although I'm not familiar with the module system
at all, I can see the following:

- default build with jdk.hotspot.agent dependency in module-info.java

./images/jdk/bin/jdeps -m jdk.jcmd
module jdk.jcmd
 requires java.base
 requires jdk.attach
 requires jdk.hotspot.agent
requires jdk.jvmstat

- moving the jdk.hotspot.agent dependency to
src/jdk.jcmd/$OS/classes/module-info.java.extra

./images/jdk/bin/jdeps -m jdk.jcmd

module jdk.jcmd
 requires java.base
 requires jdk.attach
 requires jdk.jvmstat

Tools like 'jstack' are still working, but in the default case I get:
./images/jdk/bin/jstack
Usage:
    jstack [-l] <pid>
        (to connect to running process)
    jstack -F [-m] [-l] <pid>
        (to connect to a hung process)
    jstack [-m] [-l] <executable> <core>
        (to connect to a core file)
    jstack [-m] [-l] [server_id@]<remote server IP or hostname>
        (to connect to a remote debug server)

while in the case where I've moved the dependency to
module-info.java.extra I only see:
./images/jdk/bin/jstack
Usage:
    jstack [-l] <pid>
        (to connect to running process)

i.e. the options which require the SA are not available.

So while the tools are not being refactored, how can we fix the build
on non-SA platforms if moving the SA dependency to
module-info.java.extra is no viable solution? I've tried your
suggestion to add `-addmods ALL-SYSTEM` to the jcmd launchers. It
seems to work. I still don't see the jdk.hotspot.agent dependency
displayed by jdeps (is this expected ?), but the resulting tools (i.e.
jstack) now display all the options, also the ones whoch require the
SA.

Can you please have a quick look at my changes:

http://cr.openjdk.java.net/~simonis/webrevs/2016/8151378_jdk/
http://cr.openjdk.java.net/~simonis/webrevs/2016/8151378_toplevel/

If you think they are OK, I'll resend a formal RFR to the mailing list.

Please notice that unfortunately we also need a top-level change
because for some reason we didn't define REQUIRED_OS_NAME and
REQUIRED_OS_VERSION until now and this didn't do any harm. But for the
jigsaw build it is needed.

I'm also not sure about the new
src/jdk.jcmd/$OS/classes/module-info.java.extra files. Should I leave
them in the change or should they be only introduced with the change
which actually makes them really work?

Thank you and best regards,
Volker


On Mon, Mar 7, 2016 at 3:00 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 07/03/2016 13:53, Volker Simonis wrote:
>>
>> Hi Alan, Dmitry,
>>
>> thanks a lot for your help. Alan's suggestion to move the dependency
>> from src/jdk.jcmd/share/classes/module-info.java to
>> src/jdk.jcmd/$OS/classes/module-info.java.extra works fine. After
>> doing that change I could successfully build on AIX. I'll open a bug
>> for this and post a webrev later today. As I'm not a jigsaw committer
>> I'll probably need a sponsor though :)
>>
> I reminded myself today that the build tool to augment module declarations
> from .extra files doesn't work for `requires`. So while it might help then I
> assume the generated module-info.java is incomplete for platforms that do
> support SA. These tools are begging to be refactored but from Dmitry's mail
> then it sounds like the split will take time. We might have to refactor them
> to use services or as a very short term workaround then we can build their
> launchers with `-addmods ALL-SYSTEM`.
>
> -Alan.


More information about the jigsaw-dev mailing list