Add profile option to net scripts (#25624)
* add image option to cloud CreateInstaces * add script to install perf * add profile option to gce.sh * add profile option for net.sh start * Revert "add image option to cloud CreateInstaces" This reverts commit fd63991861e632ae87e79281bca63a0f8173e201. * remove imageName from gce.sh * fix for gce.sh * add comments on permissions setup * remove profile option for gce.sh * remove short arg
This commit is contained in:
parent
4031a37521
commit
cd01c1a4ce
|
@ -807,6 +807,7 @@ $(
|
|||
install-libssl-compatability.sh \
|
||||
install-redis.sh \
|
||||
install-rsync.sh \
|
||||
install-perf.sh \
|
||||
localtime.sh \
|
||||
network-config.sh \
|
||||
remove-docker-interface.sh \
|
||||
|
|
10
net/net.sh
10
net/net.sh
|
@ -193,9 +193,13 @@ build() {
|
|||
buildVariant=--debug
|
||||
fi
|
||||
|
||||
if $profileBuild; then
|
||||
profilerFlags="RUSTFLAGS='-C force-frame-pointers=y -g ${RUSTFLAGS}'"
|
||||
fi
|
||||
|
||||
$MAYBE_DOCKER bash -c "
|
||||
set -ex
|
||||
scripts/cargo-install-all.sh farf $buildVariant --validator-only
|
||||
$profilerFlags scripts/cargo-install-all.sh farf $buildVariant --validator-only
|
||||
"
|
||||
)
|
||||
|
||||
|
@ -783,6 +787,7 @@ maybeAllowPrivateAddr=""
|
|||
maybeAccountsDbSkipShrink=""
|
||||
maybeSkipRequireTower=""
|
||||
debugBuild=false
|
||||
profileBuild=false
|
||||
doBuild=true
|
||||
gpuMode=auto
|
||||
netemPartition=""
|
||||
|
@ -869,6 +874,9 @@ while [[ -n $1 ]]; do
|
|||
elif [[ $1 = --debug ]]; then
|
||||
debugBuild=true
|
||||
shift 1
|
||||
elif [[ $1 = --profile ]]; then
|
||||
profileBuild=true
|
||||
shift 1
|
||||
elif [[ $1 = --partition ]]; then
|
||||
netemPartition=$2
|
||||
shift 2
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# perf setup
|
||||
#
|
||||
set -ex
|
||||
|
||||
[[ $(uname) = Linux ]] || exit 1
|
||||
[[ $USER = root ]] || exit 1
|
||||
|
||||
# install perf
|
||||
apt-get --assume-yes install linux-tools-common linux-tools-generic "linux-tools-$(uname -r)"
|
||||
|
||||
# setup permissions
|
||||
# Impose no scope and access restrictions on using perf_events performance monitoring
|
||||
echo -1 | tee /proc/sys/kernel/perf_event_paranoid
|
||||
# Allow recording kernel reference relocation symbol to avoid skewing symbol resolution if relocation was used
|
||||
echo 0 | tee /proc/sys/kernel/kptr_restrict
|
Loading…
Reference in New Issue