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

Add ARM64 Support #105

Merged
merged 2 commits into from
Jun 7, 2024
Merged

Add ARM64 Support #105

merged 2 commits into from
Jun 7, 2024

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Jun 7, 2024

Summary

ARM64 Support

I tested this with the paketo-samples/java/maven sample app. When building, it installs the same agent because it supports multiple architectures but we do need to set an env variable to point the agent to the right helper shared library (based on arch). When running, you can see it's picking the right architecture and starting successfully.

> docker run -it -e BPL_JPROFILER_ENABLED=true apps/maven
Calculating JVM memory based on 7377712K available memory
For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx6977226K -XX:MaxMetaspaceSize=93285K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 7377712K, Thread Count: 50, Loaded Class Count: 14056, Headroom: 0%)
Enabling Java Native Memory Tracking
Adding 137 container CA certificates to JVM truststore
Spring Cloud Bindings Enabled
JProfiler enabled on port 8849
Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:MaxDirectMemorySize=10M -Xmx6977226K -XX:MaxMetaspaceSize=93285K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -Dorg.springframework.cloud.bindings.boot.enable=true -agentpath:/layers/paketo-buildpacks_jprofiler/jprofiler/bin/linux-aarch64/libjprofilerti.so=port=8849,nowait
JProfiler> Protocol version 66
JProfiler> Java 21 detected.
JProfiler> Don't wait for frontend to connect.
JProfiler> 64-bit library
JProfiler> Starting up without initial configuration.
JProfiler> Listening locally on port: 8849.
JProfiler> Enabling native methods instrumentation.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Retransforming 7 base class files.
JProfiler> Base classes instrumented.
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::            (v3.3.0-RC1)

2024-06-07T20:28:45.816Z  INFO 1 --- [           main] io.paketo.demo.DemoApplication           : Starting DemoApplication v0.0.1-SNAPSHOT using Java 21.0.3 with PID 1 (/workspace/BOOT-INF/classes started by cnb in /workspace)
2024-06-07T20:28:45.824Z  INFO 1 --- [           main] io.paketo.demo.DemoApplication           : No active profile set, falling back to 1 default profile: "default"
2024-06-07T20:28:46.657Z  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint beneath base path '/actuator'
2024-06-07T20:28:46.891Z  INFO 1 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port 8080 (http)
2024-06-07T20:28:46.901Z  INFO 1 --- [           main] io.paketo.demo.DemoApplication           : Started DemoApplication in 1.37 seconds (process running for 1.755)

Signed-off-by: Daniel Mikusa <dan@mikusa.com>
@dmikusa dmikusa requested a review from a team as a code owner June 7, 2024 20:31
@dmikusa dmikusa added semver:minor A change requiring a minor version bump type:dependency-upgrade A dependency upgrade labels Jun 7, 2024
Signed-off-by: Daniel Mikusa <dan@mikusa.com>
@dmikusa dmikusa merged commit 0b5a67a into main Jun 7, 2024
5 checks passed
@dmikusa dmikusa deleted the arm64 branch June 7, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:dependency-upgrade A dependency upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant