Skip to content

rahul-roy-glean/cloud-profiler-java

 
 

Repository files navigation

Google Cloud Profiler Java Agent

This repository contains source code for the Google Cloud Profiler Java agent.

Installation

Most users should install the pre-built agent:

wget -q -O- https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz \
| sudo tar xzv -C /opt/cprof

See the Google Cloud Profiler Java profiling doc for detailed and most up-to-date guide on installing and using the agent.

Build from Source

In rare cases that you need to build from source, a script is provided to build the agent using Docker. Make sure Docker is installed before running the commands below.

 $ git clone https://github.com/GoogleCloudPlatform/cloud-profiler-java.git
 $ cd cloud-profiler-java
 $ ./build.sh

To build for Alpine

Only Alpine versions 3.11 and later are currently supported.

Per thread timers are not available on Alpine. Since SIGEV_THREAD_ID is not supported by timer_create on Alpine, per thread timers are not implemented and the flag -cprof_cpu_use_per_thread_timers is ignored on this platform.

$ git clone https://github.com/GoogleCloudPlatform/cloud-profiler-java.git
$ cd cloud-profiler-java
$ ./build.sh -m alpine

To build for ARM64

The following commands must be run on an ARM64 machine (e.g., Apple Silicon Mac, AWS Graviton, or ARM64 Linux). Cross compilation is not supported.

$ git clone https://github.com/GoogleCloudPlatform/cloud-profiler-java.git
$ cd cloud-profiler-java
$ ./build.sh -m arm64

About

Cloud Profiler Java agent is a tool that continuously gathers CPU usage information from Java applications

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 90.7%
  • Makefile 4.4%
  • Dockerfile 2.7%
  • Shell 2.0%
  • Linker Script 0.2%