Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-43385] Group by modules and JARs in code area breakdown. #5705

Merged
merged 4 commits into from
Jan 9, 2023

Conversation

graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented Jan 5, 2023

This PR extends the code area breakdown with module name and JAR file groups. This makes it easier for users to understand what part of their code base and external dependencies are contributing the most to the code area. It also reduces the number of possible entries because modules and JARs usually contain multiple packages.

For a Spring starter project, the result looks like this:

Top 10 origins of code area:                                Top 10 object types in image heap:
   8.10MB java.base                                            4.21MB byte[] for code metadata
   2.77MB java.xml                                             2.21MB java.lang.String
   1.25MB spring-core-6.0.3.jar                                2.08MB java.lang.Class
   1.09MB svm.jar (Native Image)                               1.77MB byte[] for general heap data
 930.81KB spring-boot-3.0.1.jar                                1.75MB byte[] for java.lang.String
 734.64KB spring-beans-6.0.3.jar                             772.49KB com.oracle.svm.core.hub.DynamicHubCompanion
 666.40KB spring-expression-6.0.3.jar                        513.00KB int[][]
 580.74KB logback-core-1.4.5.jar                             425.35KB java.lang.String[]
 414.16KB snakeyaml-1.33.jar                                 417.00KB byte[] for reflection metadata
 315.08KB java.rmi                                           357.94KB java.util.HashMap$Node
   1.85MB for 40 more origins                                  3.47MB for 1831 more object types

Using GraalVM 22.3 CE, so without this PR, it looks like this:

Top 10 packages in code area:                               Top 10 object types in image heap:
 947.89KB java.util                                            3.73MB byte[] for code metadata
 593.31KB java.lang.invoke                                     2.09MB java.lang.String
 452.21KB java.lang                                            2.09MB java.lang.Class
 447.35KB c.s.org.apache.xerces.internal.impl.xs.traversers    1.68MB byte[] for general heap data
 417.76KB com.sun.org.apache.xerces.internal.impl              1.61MB byte[] for java.lang.String
 416.42KB com.sun.crypto.provider                            776.10KB com.oracle.svm.core.hub.DynamicHubCompanion
 393.56KB java.io                                            513.09KB int[][]
 380.37KB java.util.concurrent                               400.03KB byte[] for reflection metadata
 334.50KB java.text                                          399.08KB java.lang.String[]
 330.74KB org.springframework.beans.factory.support          328.41KB java.util.HashMap$Node
  12.36MB for 407 more packages                                3.33MB for 1811 more object types

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 5, 2023
@fniephaus fniephaus self-assigned this Jan 5, 2023
@graalvmbot graalvmbot force-pushed the fniephaus/GR-43385/breakdown-jars branch from 188a706 to 149177b Compare January 6, 2023 08:54
@fniephaus fniephaus changed the title [GR-43385] Group by JAR file in code area breakdown. [GR-43385] Group by modules and JARs in code area breakdown. Jan 6, 2023
@graalvmbot graalvmbot force-pushed the fniephaus/GR-43385/breakdown-jars branch from 149177b to 3241db2 Compare January 6, 2023 09:04
SubstrateVM components are part of the `org.graalvm.nativeimage.builder` module, which can be confusing. Show `svm.jar (Native Image)` instead for now.
@graalvmbot graalvmbot force-pushed the fniephaus/GR-43385/breakdown-jars branch from 28c514e to 0b52fa9 Compare January 9, 2023 13:01
@graalvmbot graalvmbot closed this Jan 9, 2023
@graalvmbot graalvmbot deleted the fniephaus/GR-43385/breakdown-jars branch January 9, 2023 21:22
@graalvmbot graalvmbot merged commit e5c3cac into master Jan 9, 2023
@fniephaus fniephaus added this to the 23.0.0 Release milestone Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants