-
Notifications
You must be signed in to change notification settings - Fork 1
/
dotbash_zen
49 lines (41 loc) · 1.29 KB
/
dotbash_zen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
#
# .bashrc_zen
#
# Local work related changes
#
# Override Author
export GIT_AUTHOR_EMAIL="[email protected]"
# My local repo
export REPREPRO_BASE_DIR=/home/alex/public_html/repo
# LTTNG Dumping
LTTNG_HOME=/tmp/alex/lttng-traces
mkdir -p ${LTTNG_HOME}
alias clear-lttng-traces="rm -rf ${LTTNG_HOME}/*"
LTTNG_EVENTS=qemu:qemu:tb_flush_all_jump_cache,qemu:translate_block,qemu:tb_find_slow
function lttng_prepare {
local dir=basename `pwd`
trace_name="$dir-trace-`date +"%Y%m%d%H%M"`"
lttng create ${trace_name} -o ${LTTNG_HOME}/${trace_name}
lttng enable-channel --subbuf-size 262144 --num-subbuf 128 -u channel0
lttng enable-event ${LTTNG_EVENTS} -u
lttng start
echo "Started lttng $trace_name with ${LTTNG_EVENTS}"
}
# Move lsrc code to the slower moving disk part
# mv buildroot-armv7.git ~/lsrc/disk
# ln -s ~/lsrc/disk/buildroot-armv7.git buildroot-armv7.git
ZEN_DISK_PARTITION=/home/alex/lsrc/disk
function move_to_disk {
CURRENT_PWD=`pwd`
if [[ -n "$1" && -d "${CURRENT_PWD}/$1" ]]; then
local dir=${CURRENT_PWD}/${1%/}
local base=`basename ${dir}`
mv ${dir} ${ZEN_DISK_PARTITION}
ln -s ${ZEN_DISK_PARTITION}/${base} ${base}
else
echo "${dir} not a directory"
return
fi
}
alias .zen=". ~/.bash_zen"