Skip to content

Commit 40cc12a

Browse files
committed
pthread_work: legend fix
1 parent 449024d commit 40cc12a

8 files changed

Lines changed: 28 additions & 61 deletions

File tree

‎cpp/goto-cross-initialization.cpp‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎cpp/goto_cross_initialization.cpp‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// http://stackoverflow.com/questions/5685471/error-jump-to-case-label
2+
3+
int main() {
4+
goto after;
5+
#if 0
6+
// error: jump to label ‘after’
7+
// note: crosses initialization of ‘int i’
8+
int i = 0;
9+
#endif
10+
after:
11+
;
12+
}

‎cpp/placement-new.cpp‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎cpp/template_cheat.cpp‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎cpp/utility.cpp‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎gcc/empty_struct.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/*
2-
# Empty struct
3-
*/
1+
/* Empty struct */
42

53
#include "common.h"
64

‎posix/interactive/pthread_work.gnuplot‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,25 @@
22
set terminal png size 1024, 1024
33
set style data linespoints
44
set output 'pthread_work.png'
5-
set multiplot layout 2,1
6-
set xlabel "cores"
7-
set ylabel "time (s)"
5+
set multiplot layout 3,1
6+
set xlabel "threads"
87

98
set title "wall, user and sys"
9+
set ylabel "time (s)"
1010
set yrange [-20:]
1111
set key right center
12-
plot 'pthread_work.dat' using 2 title 'wall', \
13-
'pthread_work.dat' using 3 title 'user', \
14-
'pthread_work.dat' using 4 title 'sys'
12+
plot 'pthread_work.dat' using 1:2 title 'wall', \
13+
'pthread_work.dat' using 1:3 title 'user', \
14+
'pthread_work.dat' using 1:4 title 'sys'
15+
16+
set title "wall, user and sys / threads"
17+
set yrange [0:]
18+
set key right top
19+
plot 'pthread_work.dat' using 1:($2/$1) title 'wall', \
20+
'pthread_work.dat' using 1:($3/$1) title 'user', \
21+
'pthread_work.dat' using 1:($4/$1) title 'sys'
1522

1623
set title 'user / wall ratio'
24+
set ylabel "ratio"
1725
set yrange [0:*]
1826
plot 'pthread_work.dat' using 1:($3/$2) notitle

‎posix/interactive/pthread_work.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ while [ "$i" -le "$n" ]; do
1111
;
1212
i=$((i + 1))
1313
done
14+
./pthread_work.gnuplot

0 commit comments

Comments
 (0)