Commit 7a62cba8 authored by nagayama15's avatar nagayama15

ログ出力の形式を修正

parent 2b182eff
#!/bin/zsh #!/bin/zsh
g1() { g1() {
FILE=$(basename ${1/-block-wm.txt/.c}) FILE=$(basename ${1/-block-wm.txt/.c})
FUNCS=$(tail -n +2 $1 | wc -l) FUNCS=$(cat $1 | wc -l)
BLOCKS=$(tail -n +2 $1 | awk '{a+=$2} END {print a}') BLOCKS=$(awk '{a+=$2} END {print a}' $1)
BITS=$(tail -n +2 $1 | awk '{a+=$3} END {print a}') BITS=$(awk '{a+=$3} END {print a}' $1)
echo "$FILE, $FUNCS, $BLOCKS, $BITS" echo "$FILE, $FUNCS, $BLOCKS, $BITS"
} }
...@@ -24,8 +24,8 @@ h1() { ...@@ -24,8 +24,8 @@ h1() {
g2() { g2() {
FILE=$(basename ${1/-inst-wm.txt/.c}) FILE=$(basename ${1/-inst-wm.txt/.c})
INSTS=$(tail -n +2 $1 | awk '{a+=$2} END {print a}') INSTS=$(awk '{a+=$2} END {print a}' $1)
BITS=$(tail -n +2 $1 | awk '{a+=$3} END {print a}') BITS=$(awk '{a+=$3} END {print a}' $1)
echo "$FILE, $INSTS, $BITS" echo "$FILE, $INSTS, $BITS"
} }
...@@ -44,8 +44,12 @@ h2() { ...@@ -44,8 +44,12 @@ h2() {
echo "$R" | awk '{f++; a+=$2; b+=$3} END {print "files: " f ", insts: " a ", bits: " b}' echo "$R" | awk '{f++; a+=$2; b+=$3} END {print "files: " f ", insts: " a ", bits: " b}'
} }
echo "==== 8cc block-wm ===="
h1 obj/example/8cc/stage1-wm/*-block-wm.txt h1 obj/example/8cc/stage1-wm/*-block-wm.txt
echo "==== zlib block-wm ===="
h1 obj/example/zlib/zlib-block-wm/*-block-wm.txt h1 obj/example/zlib/zlib-block-wm/*-block-wm.txt
echo "==== 8cc inst-wm ===="
h2 obj/example/8cc/stage1-wm/*-inst-wm.txt h2 obj/example/8cc/stage1-wm/*-inst-wm.txt
echo "==== zlib inst-wm ===="
h2 obj/example/zlib/zlib-inst-wm/*-inst-wm.txt h2 obj/example/zlib/zlib-inst-wm/*-inst-wm.txt
...@@ -93,8 +93,6 @@ namespace ...@@ -93,8 +93,6 @@ namespace
bit_stream_ = nykk::CircularBitStream::from_string(nykk::pass::watermark_opt); bit_stream_ = nykk::CircularBitStream::from_string(nykk::pass::watermark_opt);
perm_table_ = nykk::create_permutation_table(partition_opt.getValue().value); perm_table_ = nykk::create_permutation_table(partition_opt.getValue().value);
llvm::errs() << "func" << ", " << "blocks" << ", " << "bits" << "\n";
return false; return false;
} }
......
...@@ -49,8 +49,6 @@ namespace ...@@ -49,8 +49,6 @@ namespace
module_name_ = function.getParent()->getName(); module_name_ = function.getParent()->getName();
bit_stream_ = nykk::CircularBitStream::from_string(nykk::pass::watermark_opt); bit_stream_ = nykk::CircularBitStream::from_string(nykk::pass::watermark_opt);
llvm::errs() << "func" << ", " << "insts" << ", " << "bits" << "\n";
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment