Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christopher Ferreira
erods-bench
Commits
37f2077a
Commit
37f2077a
authored
Jul 27, 2017
by
aumgn
Browse files
[exp script] Fix issue with root rights
parent
689c4a05
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/mc-2/exp
View file @
37f2077a
...
...
@@ -4,7 +4,7 @@ set -e
export
TMPFS_PATH
=
$BENCH_PATH
/tmpfs
export
PERF_BASE_PREFIX
=
"perf record -a -c 1 -e sched:sched_thread_placement"
export
PERF_BASE_PREFIX
=
"perf record -a -c 1 -e sched:sched_thread_placement
,sched:sched_switch,sched:sched_load_update
"
export
PINTHREADS_PATH
=
$HOME
/bench/tools/PinThreads
export
PINTHREADS_BIN
=
$PINTHREADS_PATH
/pinthreads
...
...
@@ -226,10 +226,10 @@ run_iterations() {
local
cmd_prefix
=
"
$perf_prefix
$time_prefix
$pin_prefix
"
local
cmd
=
"
$(
command_
$program
"
$cmd_prefix
"
"
$threads
"
)
"
echo
"####
$cmd
"
>
$iteration_dir
/command
echo
"####
sudo
$cmd
"
>
$iteration_dir
/command
cat
/proc/schedstat
>
$iteration_dir
/schedstat.before
eval
"
$cmd
"
1>>
$output
2>>
$errors
eval
"
sudo
$cmd
"
1>>
$output
2>>
$errors
echo
"
$?
"
>
$iteration_dir
/exit_status
cat
/proc/schedstat
>
$iteration_dir
/schedstat.after
...
...
@@ -271,6 +271,7 @@ check_errors() {
move_results
()
{
msg
"# Moving results"
sudo chown
-R
$(
id
-un
)
:
$(
id
-gn
)
$TMP_RESULTS_DIR
mv
$TMP_RESULTS_DIR
/
*
$RESULTS_DIR
/
rm
-rf
$TMP_RESULTS_DIR
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment