This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pre-req: gcc, gcc-c++, git (to clone), openjdk with debug symbols (centos: java-1.8.0-openjdk-debug.x86_64, ubuntu: openjdk-8-dbg) | |
# Git clone async-profiler https://github.com/jvm-profiling-tools/async-profiler | |
# Make sure JAVA_HOME is set and you are logged as same user running the java process | |
cd async-profiler | |
make all | |
# Also git clone FlameGraph in the same directory as you clone async-profiler | |
# sysctl changes | |
echo 1 > /proc/sys/kernel/perf_event_paranoid | |
echo 0 > /proc/sys/kernel/kptr_restrict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL_HTML=$1 | |
OUT=$2 | |
if [ "x$URL_HTML"="x" || "x$OUT"="x" ] | |
then | |
echo "$0 html outfile" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function retry() { | |
# retry [--limit,-l] [--delay,-d] [--] command args.. | |
[ $# -lt 1 ] && echo "return [-ld] [--] commands [args...]" >&2 && return | |
LIMIT=5 | |
DELAY=5 | |
while [[ $# > 0 ]]; do | |
case $1 in | |
--limit|-l) | |
shift |