Re: JVMInit function call - where is it located the source?

2018-08-21 Thread mr rupplin
Ok, David.  Great, you did it.


From: David Holmes 
Sent: Tuesday, August 21, 2018 9:38:06 PM
To: mr rupplin; core-libs-dev@openjdk.java.net; Andrew Haley
Subject: Re: JVMInit function call - where is it located the source?

On 22/08/2018 11:02 AM, mr rupplin wrote:
> Quickly, where do we look?  I can't seem to find where the "javac" command is 
> called in the C interface.

javac is just the name of a executable launcher that is built.

See make/launcher/Launcher-jdk.compiler.gmk

> Where is the java code that runs the parser/compiler?  Ok, thanks gotta run 
> ably.

src/jdk.compiler/share/classes/com/sun/tools/javac

David

>
> /mr
>
> 
> From: mr rupplin 
> Sent: Tuesday, August 21, 2018 6:37:30 PM
> To: core-libs-dev@openjdk.java.net; Andrew Haley
> Subject: Re: JVMInit function call - where is it located the source?
>
> Thanks.
>
> Get Outlook for Android<https://aka.ms/ghei36>
>
> 
> From: Andrew Haley 
> Sent: Tuesday, August 21, 2018 12:32:20 PM
> To: mr rupplin; core-libs-dev@openjdk.java.net
> Subject: Re: JVMInit function call - where is it located the source?
>
> On 08/21/2018 05:21 PM, mr rupplin wrote:
>> Inside java.c there is a JLI_Launch which purports to be the launching or 
>> entry point for the JVM.  The last line shows:
>>
>>
>> return JVMInit(, threadStackSize, argc, argv, mode, what, ret);
>>
>>
>> This is given apparently as a function call that will return an int.  
>> However the include file java.h shows no source for this function.
>
>>   Where is it located?
>
> Couldn't you just look?
>
> src/java.base/unix/native/libjli/java_md_solinux.c:79
>
>> And finally where is the javac.c source file? I'm sure it's been here and 
>> now its lost. - ok
>
> It's part of the Java launcher, jexec.c. The easiest way to discover
> this stuff is to run javac in a real C++ debugger.
>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>


Re: JVMInit function call - where is it located the source?

2018-08-21 Thread David Holmes

On 22/08/2018 11:02 AM, mr rupplin wrote:

Quickly, where do we look?  I can't seem to find where the "javac" command is 
called in the C interface.


javac is just the name of a executable launcher that is built.

See make/launcher/Launcher-jdk.compiler.gmk


Where is the java code that runs the parser/compiler?  Ok, thanks gotta run 
ably.


src/jdk.compiler/share/classes/com/sun/tools/javac

David



/mr


From: mr rupplin 
Sent: Tuesday, August 21, 2018 6:37:30 PM
To: core-libs-dev@openjdk.java.net; Andrew Haley
Subject: Re: JVMInit function call - where is it located the source?

Thanks.

Get Outlook for Android<https://aka.ms/ghei36>


From: Andrew Haley 
Sent: Tuesday, August 21, 2018 12:32:20 PM
To: mr rupplin; core-libs-dev@openjdk.java.net
Subject: Re: JVMInit function call - where is it located the source?

On 08/21/2018 05:21 PM, mr rupplin wrote:

Inside java.c there is a JLI_Launch which purports to be the launching or entry 
point for the JVM.  The last line shows:


return JVMInit(, threadStackSize, argc, argv, mode, what, ret);


This is given apparently as a function call that will return an int.  However 
the include file java.h shows no source for this function.



  Where is it located?


Couldn't you just look?

src/java.base/unix/native/libjli/java_md_solinux.c:79


And finally where is the javac.c source file? I'm sure it's been here and now 
its lost. - ok


It's part of the Java launcher, jexec.c. The easiest way to discover
this stuff is to run javac in a real C++ debugger.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



Re: JVMInit function call - where is it located the source?

2018-08-21 Thread mr rupplin
Quickly, where do we look?  I can't seem to find where the "javac" command is 
called in the C interface.


Where is the java code that runs the parser/compiler?  Ok, thanks gotta run 
ably.


/mr


From: mr rupplin 
Sent: Tuesday, August 21, 2018 6:37:30 PM
To: core-libs-dev@openjdk.java.net; Andrew Haley
Subject: Re: JVMInit function call - where is it located the source?

Thanks.

Get Outlook for Android<https://aka.ms/ghei36>


From: Andrew Haley 
Sent: Tuesday, August 21, 2018 12:32:20 PM
To: mr rupplin; core-libs-dev@openjdk.java.net
Subject: Re: JVMInit function call - where is it located the source?

On 08/21/2018 05:21 PM, mr rupplin wrote:
> Inside java.c there is a JLI_Launch which purports to be the launching or 
> entry point for the JVM.  The last line shows:
>
>
> return JVMInit(, threadStackSize, argc, argv, mode, what, ret);
>
>
> This is given apparently as a function call that will return an int.  However 
> the include file java.h shows no source for this function.

>  Where is it located?

Couldn't you just look?

src/java.base/unix/native/libjli/java_md_solinux.c:79

> And finally where is the javac.c source file? I'm sure it's been here and now 
> its lost. - ok

It's part of the Java launcher, jexec.c. The easiest way to discover
this stuff is to run javac in a real C++ debugger.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


Re: JVMInit function call - where is it located the source?

2018-08-21 Thread mr rupplin
Thanks.

Get Outlook for Android<https://aka.ms/ghei36>


From: Andrew Haley 
Sent: Tuesday, August 21, 2018 12:32:20 PM
To: mr rupplin; core-libs-dev@openjdk.java.net
Subject: Re: JVMInit function call - where is it located the source?

On 08/21/2018 05:21 PM, mr rupplin wrote:
> Inside java.c there is a JLI_Launch which purports to be the launching or 
> entry point for the JVM.  The last line shows:
>
>
> return JVMInit(, threadStackSize, argc, argv, mode, what, ret);
>
>
> This is given apparently as a function call that will return an int.  However 
> the include file java.h shows no source for this function.

>  Where is it located?

Couldn't you just look?

src/java.base/unix/native/libjli/java_md_solinux.c:79

> And finally where is the javac.c source file? I'm sure it's been here and now 
> its lost. - ok

It's part of the Java launcher, jexec.c. The easiest way to discover
this stuff is to run javac in a real C++ debugger.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


Re: JVMInit function call - where is it located the source?

2018-08-21 Thread Andrew Haley
On 08/21/2018 05:21 PM, mr rupplin wrote:
> Inside java.c there is a JLI_Launch which purports to be the launching or 
> entry point for the JVM.  The last line shows:
> 
> 
> return JVMInit(, threadStackSize, argc, argv, mode, what, ret);
> 
> 
> This is given apparently as a function call that will return an int.  However 
> the include file java.h shows no source for this function.

>  Where is it located?

Couldn't you just look?

src/java.base/unix/native/libjli/java_md_solinux.c:79

> And finally where is the javac.c source file? I'm sure it's been here and now 
> its lost. - ok

It's part of the Java launcher, jexec.c. The easiest way to discover
this stuff is to run javac in a real C++ debugger.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


Re: JVMInit function call - where is it located the source?

2018-08-21 Thread Aleksey Shipilev
Hi,

I think you need to freshen up the search-fu: find, grep, and ack (beyondgrep). 
Without it, you
would find understanding the structure of any large project, OpenJDK included, 
quite frustrating.

On 08/21/2018 06:21 PM, mr rupplin wrote:
> This is given apparently as a function call that will return an int. However 
> the include
> filejava.h shows no source for this function. Where is it located?
[jdk-jdk] $ ack JVMInit src/
src/java.base/unix/native/libjli/java_md_solinux.c
791:JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
800:PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)

src/java.base/macosx/native/libjli/java_md_macosx.c
885:JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
924:void PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm) {

src/java.base/windows/native/libjli/java_md.c
886:JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
895:PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)

src/java.base/share/native/libjli/java.h
189:int JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
202:void PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm);

src/java.base/share/native/libjli/java.c
341:return JVMInit(, threadStackSize, argc, argv, mode, what, ret);
529: * PostJVMInit uses the class name as the application name for GUI 
purposes,
535:PostJVMInit(env, appClass, vm);


> And finally where is the javac.c source file? I'm sure it's been here and now 
> its lost. - ok

[jdk-jdk] $ find src/ -name java.c
src/java.base/share/native/libjli/java.c

-Aleksey




Re: JVMInit function call - where is it located the source?

2018-08-21 Thread Jonathan Gibbons




On 8/21/18 9:21 AM, mr rupplin wrote:

Inside java.c there is a JLI_Launch which purports to be the launching or entry 
point for the JVM.  The last line shows:


return JVMInit(, threadStackSize, argc, argv, mode, what, ret);


This is given apparently as a function call that will return an int.  However 
the include file java.h shows no source for this function.  Where is it located?


--


And finally where is the javac.c source file? I'm sure it's been here and now 
its lost. - ok


max


Max,

grep is your friend. Try `grep -r JVMInit src`.

Re: javac.c source file.
You asked this before, on July 20, in an email with the subject line 
"Short Question - About javac.c where is it?".
It was answered back then by Erik Joelsson; I suggest you refer back to 
his answer.


-- Jon


JVMInit function call - where is it located the source?

2018-08-21 Thread mr rupplin
Inside java.c there is a JLI_Launch which purports to be the launching or entry 
point for the JVM.  The last line shows:


return JVMInit(, threadStackSize, argc, argv, mode, what, ret);


This is given apparently as a function call that will return an int.  However 
the include file java.h shows no source for this function.  Where is it located?


--


And finally where is the javac.c source file? I'm sure it's been here and now 
its lost. - ok


max