-
Notifications
You must be signed in to change notification settings - Fork 316
Custom profiling commands & flamegraphs #890
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
Open
oschaaf
wants to merge
43
commits into
istio:master
Choose a base branch
from
oschaaf:profiling
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
1d5d128
Custom profiling commands & flamegraphs
oschaaf 70b6e52
Docker linting, fix TODO
oschaaf 93da236
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 81d4d7a
Docker lint tweak
oschaaf ee62a80
Add perf label to flamegraph filename
oschaaf 689021b
Deduplicate redundant functionality
oschaaf a3f5587
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf bffad09
Dockerfile.perf linting: pin package versions
oschaaf 6425935
bash linting: double quote arg
oschaaf 81f4d4d
Add licence / copyright banner
oschaaf b37cea8
Python whitespace linting fix
oschaaf d5d5d59
Markdown linting fixes
oschaaf 4871583
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf eb6090f
Move profiling thread start into function
oschaaf 6730880
Python linting fix
oschaaf 5e5ce41
Small fixes
oschaaf f265cfd
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 9e9320a
lint whitespace
oschaaf 4dda5a9
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 1377ee3
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 2886e04
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf fa42cab
Sync up with the latest changes
oschaaf 680b10c
linting fixes + fix in fortio.yaml
oschaaf 30342ff
Changes ot minimize the diff
oschaaf 0b9e851
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 2fccdd6
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf 83a8e40
Tweak flamegraph file naming
oschaaf 94f6120
Fix NH-mode --ingress option
oschaaf 7f28c4c
Lint fix
oschaaf e274665
Small enhancenments/fixes
oschaaf b96687e
Fix hang, improve error handling. Doc enhancements.
oschaaf 17d136a
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf aae1f19
Lint change in runner.py
oschaaf fdfe910
Flag for allowing short runs. Doc pagefault flamgraphing.
oschaaf 47c63f5
runner.py: add --envoy_profiler option
oschaaf b2aa8f0
Lint fixes
oschaaf 1c5a3dd
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf b19423b
Markdown lint fixes
oschaaf 70e8f5a
Add scrape annotations for prom. node exporter
oschaaf e641309
network flakes in Ci: Add hard coded single retry per test execution
oschaaf 2d71dd1
Remove line of code for debugging
oschaaf bce6a4f
Tweaks for bleeding edge istio
oschaaf 50a2a63
Merge remote-tracking branch 'upstream/master' into profiling
oschaaf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| FROM ubuntu:18.04 | ||
|
|
||
| WORKDIR /root | ||
|
|
||
| COPY perf/setup-node-for-profiling.sh setup-node-for-profiling.sh | ||
|
|
||
| RUN apt update && \ | ||
| apt install -y git gcc make curl wget libelf-dev bc bpfcc-tools \ | ||
| bison flex \ | ||
| libdw-dev systemtap-sdt-dev libunwind-dev libaudit-dev \ | ||
| libssl-dev libslang2-dev libgtk2.0-dev libperl-dev python-dev && \ | ||
| chmod +x setup-node-for-profiling.sh && \ | ||
| wget -qO- https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz | tar -C . -xvzf - && \ | ||
| cp node_exporter-*/node_exporter /usr/bin/ && \ | ||
| rm -rf node_exporter-* && \ | ||
| git clone --depth=1 https://github.com/BrendanGregg/FlameGraph && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| rm -rf /tmp/* | ||
|
|
||
| CMD ["setup-node-for-profiling.sh"] | ||
|
|
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -ex | ||
|
|
||
| USR_SRC="/usr/src" | ||
| KERNEL_VERSION="$(uname -r)" | ||
| CHROMEOS_RELEASE_VERSION="$(grep 'CHROMEOS_RELEASE_VERSION' /etc/lsb-release.host | cut -d '=' -f 2)" | ||
|
|
||
| build_kernel() | ||
| { | ||
| # Build the headers | ||
| cd "${WORKING_DIR}" | ||
| zcat /proc/config.gz > .config | ||
| make ARCH=x86 oldconfig > /dev/null | ||
| make ARCH=x86 prepare > /dev/null | ||
|
|
||
| # Build perf | ||
| cd tools/perf/ | ||
| make ARCH=x86 > /dev/null | ||
| mv perf /usr/sbin/ | ||
| } | ||
|
|
||
| prepare_node() | ||
| { | ||
| WORKING_DIR="/linux-lakitu-${CHROMEOS_RELEASE_VERSION}" | ||
| SOURCES_DIR="${USR_SRC}/linux-lakitu-${CHROMEOS_RELEASE_VERSION}" | ||
| mkdir -p "${WORKING_DIR}" | ||
| curl -s "https://storage.googleapis.com/cos-tools/${CHROMEOS_RELEASE_VERSION}/kernel-src.tar.gz" \ | ||
| | tar -xzf - -C "${WORKING_DIR}" | ||
| build_kernel | ||
| rm -rf "${USR_SRC}${WORKING_DIR}" | ||
| mv "${WORKING_DIR}" "${USR_SRC}" | ||
| } | ||
|
|
||
| prepare_node | ||
| mkdir -p "/lib/modules/${KERNEL_VERSION}" | ||
| ln -sf "${SOURCES_DIR}" "/lib/modules/${KERNEL_VERSION}/source" | ||
| ln -sf "${SOURCES_DIR}" "/lib/modules/${KERNEL_VERSION}/build" | ||
|
|
||
| # fire up the node exporter process, listening at the passed in address:port | ||
| node_exporter --web.listen-address $1 | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.