Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Created December 27, 2020 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yasushi/b0926637473e81b9bd7e319456ce7df7 to your computer and use it in GitHub Desktop.
Save Yasushi/b0926637473e81b9bd7e319456ce7df7 to your computer and use it in GitHub Desktop.
jmh + perf + async-profiler container
FROM amazonlinux:2
RUN amazon-linux-extras enable corretto8
RUN yum -y install java-1.8.0-amazon-corretto-devel sudo vim perf tar && yum -y clean all
RUN curl -sL https://github.com/jvm-profiling-tools/async-profiler/releases/download/v1.8.2/async-profiler-1.8.2-linux-x64.tar.gz -o /tmp/async-profiler-1.8.2-linux-x64.tar.gz \
&& mkdir /usr/local/async-profiler \
&& tar xf /tmp/async-profiler-1.8.2-linux-x64.tar.gz --strip-components 1 -C /usr/local/async-profiler \
&& cp /usr/local/async-profiler/build/libasyncProfiler.so /lib64
COPY kernel_params.sh /kernel_params.sh
#!/bin/bash
echo 1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment