Review request: 8003562: Provide a command-line tool to find static dependencies

Mandy Chung mandy.chung at oracle.com
Thu Dec 6 15:35:33 UTC 2012


Thanks Erik for the help. I missed the files for images build.   I'll 
incorporate your patch.

Mandy

On 12/6/2012 6:37 AM, Erik Joelsson wrote:
> Hello,
>
> I've looked at the build changes and noted that the old and new build 
> did not produce the same results. Here is a webrev with adjustments (I 
> chose to do a full forest webrev because I needed to change a file in 
> the root too):
>
> http://cr.openjdk.java.net/~erikj/8003562/webrev.03/
>
> The changes are:
>
> * Add the jdeps package to tools.jar in new build
> * Exclude jdeps from jre in new build
> * Add "-DEXPAND_CLASSPATH_WILDCARDS 
> -DNEVER_ACT_AS_SERVER_CLASS_MACHINE" to compile in old build. I wasn't 
> sure if these were intended for this launcher, but I'm guessing that 
> it makes sense to match the settings of javap and javah. The other 
> alternative is to remove these from both old and new build.
> * Add ./bin/jdeps to some exception lists in compare script. (jdeps, 
> like most executables, contains the version string.)
>
> With these changes, I don't see any new regressions in the compare 
> script on my machine.
>
> /Erik
>
> On 2012-12-06 02:36, Mandy Chung wrote:
>> This review request (add a new jdeps tool in the JDK) include changes in
>> langtools and the jdk build.  I would need reviewers from the langtools
>> and the build-infra team.
>>
>> Webrev for review:
>> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/jdeps/langtools-webrev.02/
>> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/jdeps/jdk-webrev.02/
>>
>> The jdeps source is in the langtools repo.  The change in the jdk 
>> repo is
>> to add the new jdeps executable.  I made change in the old and new build
>> for the addition of this new jdeps tool.  I discussed with Jon whether I
>> should modify langtools/make/build.xml to add a new jdeps target. Since
>> the old build will be replaced by the new build soon, I simply add
>> com/sun/tools/jdeps as part of javap.includes.
>>
>> Alan,
>>
>> The -d option is kept as a hidden option and use as implementation. We
>> can remove it when it's determined not useful in the future.  I also
>> rename -v:summary to -summary.
>>
>> Thanks
>> Mandy
>>
>> ----------------------------
>>
>> $ jdep -h
>> Usage: jdeps <options> <files....>
>> where possible options include:
>>   -version                 Version information
>>   -classpath <path>        Specify where to find class files
>>   -summary                 Print dependency summary only
>>   -v:class                 Print class-level dependencies
>>   -v:package               Print package-level dependencies
>>   -p <package name>        Restrict analysis to classes in this package
>>                            (may be given multiple times)
>>   -e <regex>               Restrict analysis to packages matching 
>> pattern
>>                            (-p and -e are exclusive)
>>   -P  --profile            Show profile or the file containing a package
>>   -R  --recursive          Traverse all dependencies recursively
>>   -all                     Process all classes specified in -classpath
>>
>> $ jdep Notepad.jar Ensemble.jar
>> Notepad.jar -> D:\tools\devtools\jdk8\windows-i586\jre\lib\rt.jar
>> <unnamed> (Notepad.jar)
>>       -> java.awt
>>       -> java.awt.event
>>       -> java.beans
>>       -> java.io
>>       -> java.lang
>>       -> java.net
>>       -> java.util
>>       -> java.util.logging
>>       -> javax.swing
>>       -> javax.swing.border
>>       -> javax.swing.event
>>       -> javax.swing.text
>>       -> javax.swing.tree
>>       -> javax.swing.undo
>>
>> Ensemble.jar -> D:\tools\devtools\jdk8\windows-i586\jre\lib\jfxrt.jar
>> Ensemble.jar -> D:\tools\devtools\jdk8\windows-i586\jre\lib\rt.jar
>>    com.javafx.main (Ensemble.jar)
>>       -> java.applet
>>       -> java.awt
>>       -> java.awt.event
>>       -> java.io
>>       -> java.lang
>>       -> java.lang.reflect
>>       -> java.net
>>       -> java.security
>>       -> java.util
>>       -> java.util.jar
>>       -> javax.swing
>>       -> sun.misc                                 JDK internal API 
>> (rt.jar)



More information about the build-dev mailing list