Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-05-03 Thread Alan Bateman
On 02/05/2019 09:35, Yasumasa Suenaga wrote: > Would it be possible re-outline the problem and/or include the exception that is being observed? We can see TypeError thrown by Nashorn when we attach CLHSDB. It means JS in jdk.hotspot.agent (sa.js) could not call sun.jvm.hotspot.runtime.VM::getV

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-05-02 Thread Yasumasa Suenaga
> Would it be possible re-outline the problem and/or include the exception that is being observed? We can see TypeError thrown by Nashorn when we attach CLHSDB. It means JS in jdk.hotspot.agent (sa.js) could not call sun.jvm.hotspot.runtime.VM::getVM . It is caused that jdk.hotspot.agent does

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-05-02 Thread Alan Bateman
On 02/05/2019 07:30, Alan Bateman wrote: (and no guarantee that the CSR would be approved because we agreed in JDK 9 that jdk.hotspot.agent would be a supported interface). This should say "would not be a supported interface" of course.

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-05-01 Thread Alan Bateman
On 02/05/2019 06:47, Sundararajan Athijegannathan wrote: Hi Yasumasa, Sorry for delayed response. Your webrev looks like a good start! Unfortunately, dependency on nashorn is inevitable. But there is a similar (but different) object API for Graal.js. In future, someone may have to do some por

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-05-01 Thread Sundararajan Athijegannathan
Hi Yasumasa, Sorry for delayed response. Your webrev looks like a good start! Unfortunately, dependency on nashorn is inevitable. But there is a similar (but different) object API for Graal.js. In future, someone may have to do some porting work. Thanks, -Sundar On 19/04/19, 6:37 PM, Yasuma

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-19 Thread Yasumasa Suenaga
Hi Sundar, I tried to implement JSObject for SA. Following webrev is not completed, but it can get VM object and Debugger in it from sa.js: http://cr.openjdk.java.net/~ysuenaga/JDK-8157947/jsobject.work/ It is not completed (error will occur when CLSDB is attached.) but I want to hear your op

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-18 Thread Sundararajan Athijegannathan
Hi Yasumasa Thanks for confirming that we've the same issue with Graal.js as well. I think JSObject impl. idea should be investigated. I think there is similar (script) reflective API in Graal.js as well. Thanks -Sundar On 17/04/19, 7:37 PM, Yasumasa Suenaga wrote: Hi Sundar, On 2019/04/16

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-17 Thread Yasumasa Suenaga
Hi Sundar, On 2019/04/16 13:32, Sundararajan Athijegannathan wrote: Hi Yasumasa, Response comments inlined below.. On 16/04/19, 5:21 AM, Yasumasa Suenaga wrote: Hi Sundar, On 2019/04/15 16:58, Sundararajan Athijegannathan wrote: Both options are hacks :( Personally I'm not comfortable with

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-15 Thread Sundararajan Athijegannathan
Hi Yasumasa, Response comments inlined below.. On 16/04/19, 5:21 AM, Yasumasa Suenaga wrote: Hi Sundar, On 2019/04/15 16:58, Sundararajan Athijegannathan wrote: Both options are hacks :( Personally I'm not comfortable with either option. JSObject wrapper suggested in the bug is not impossib

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-15 Thread Yasumasa Suenaga
Hi Sundar, On 2019/04/15 16:58, Sundararajan Athijegannathan wrote: Both options are hacks :( Personally I'm not comfortable with either option. JSObject wrapper suggested in the bug is not impossible to do. VM.getVM() would the "initial object" -- a JSObject impl. that walks through objects i

Re: 8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-15 Thread Sundararajan Athijegannathan
Both options are hacks :( Personally I'm not comfortable with either option. JSObject wrapper suggested in the bug is not impossible to do. VM.getVM() would the "initial object" -- a JSObject impl. that walks through objects is possible. JSObject impls. can cache fields/methods reflectively a

8157947: SA: Javascript engine can't access internal packages of jdk.hotspot.agent

2019-04-12 Thread Yasumasa Suenaga
Hi all, I saw the message when I attached CLHSDB to target VM as below: javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54 Warning! JS Engine can't start, some commands will not be available. It has been reported as JDK-815794