Commit c1e3f5eb authored by nagayama15's avatar nagayama15

ログの出力形式を変更

parent 6eccca3c
#!/bin/zsh
g() {
NAME=$1
SIZE=$(stat -c %s $NAME)
LINES=$(wc -l $NAME | awk '{print $1+1}')
SIZE=$(stat -c %s $1)
LINES=$(wc -l $1 | awk '{print $1+1}')
echo "name, $1, size, $SIZE, lines, $LINES"
echo "$1, $SIZE, $LINES"
}
f() {
......@@ -13,5 +12,6 @@ f() {
done
}
echo "name, size, lines"
f example/8cc/8cc/*.c
f example/zlib/zlib/*.c
......@@ -99,6 +99,8 @@ namespace
perm_table_ = nykk::create_permutation_table(partition_opt.getValue().value);
bit_pos_ = 0;
llvm::errs() << "func" << ", " << "blocks" << ", " << "bits" << "\n";
return false;
}
......@@ -125,15 +127,13 @@ namespace
*/
bool runOnFunction(llvm::Function& func) override
{
llvm::errs()
<< "[BlockWatermarker - '" << func.getName() << "' in " << module_name_ << "] Basic blocks: " << func.size() << "\n";
llvm::errs() << func.getName() << ", " << func.size() << ", ";
const auto partition = partition_opt.getValue().value;
if (func.size() <= partition)
{
llvm::errs()
<< " function '" << func.getName() << "' is too small to watermark" << "\n";
llvm::errs() << 0 << "\n";
return false;
}
......@@ -179,8 +179,7 @@ namespace
last_block = &blocks[block_index].get();
}
llvm::errs()
<< " " << num_embedded_bits << "bit watermark embedded in function '" << func.getName() << "'" << "\n";
llvm::errs() << num_embedded_bits << "\n";
return true;
}
......
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