View
@@ -53,15 +53,18 @@ extract-other() {
time for f in $TAR_DIR/*gz; do
tar -x --directory $TAR_DIR --file $f
done
ls -l $TAR_DIR
}
extract-oil() {
local target=_release/oil.tar
rm -f -v $target
make $target
tar -x --directory $TAR_DIR --file $target
ls -l $TAR_DIR
}
extract() {
extract-oil
extract-other
}
# NOTE: build/test.sh measures the time already.
@@ -153,10 +156,13 @@ build-task() {
case $action in
configure)
"${TIME_PREFIX[@]}" -- ./configure
# Cleaning here relies on the ORDER of tasks.txt. configure happens
# before build. The Clang build shouldn't reuse GCC objects!
# It has to be done after configure, because the Makefile must exist!
make clean
"${TIME_PREFIX[@]}" -- ./configure
;;
make)
"${TIME_PREFIX[@]}" -- make CC=$compiler_path
@@ -230,7 +236,7 @@ measure() {
local prefix=${name%.compiler-provenance.txt} # strip suffix
local times_out="$raw_dir/$prefix.times.csv"
mkdir -p $BASE_DIR/{raw,stage1}
mkdir -p $BASE_DIR/{raw,stage1} $raw_dir
# TODO: the $times_out calculation is duplicated in build-task()0
@@ -250,4 +256,31 @@ measure() {
cp -v $provenance $raw_dir
}
#
# Data Preparation and Analysis
#
stage1() {
local raw_dir=${1:-$BASE_DIR/raw}
local out=$BASE_DIR/stage1
mkdir -p $out
local times_csv=$out/times.csv
# Globs are in lexicographical order, which works for our dates.
local -a a=($raw_dir/flanders.*.times.csv)
local -a b=($raw_dir/lisa.*.times.csv)
csv-concat ${a[-1]} ${b[-1]} > $times_csv
# Construct a one-column CSV file
local raw_data_csv=$out/raw-data.csv
{ echo 'path'
echo ${a[-1]}
echo ${b[-1]}
} > $raw_data_csv
head $out/*
wc -l $out/*
}
"$@"
View
@@ -183,7 +183,10 @@ clean-repo() {
clean-pyc
}
# 'make clean'. NOTE: There are no object files written now.
# 'make clean'.
# NOTE:
# - There are no object files written now.
# - We're not cleaning _build/detect-config.* ?
clean-source-tarball-build() {
rm -f -v _bin/oil.*
rm -f -v _build/oil/ovm _build/oil/ovm-dbg
View
@@ -51,6 +51,16 @@ install-re2c() {
re2c() { _deps/re2c-1.0.3/re2c "$@"; }
download-clang() {
wget --directory _deps \
http://releases.llvm.org/5.0.1/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz
}
extract-clang() {
cd _deps
time tar -x --xz < clang*.tar.xz
}
types-gen() {
PYTHONPATH=. osh/ast_gen.py "$@" > _devbuild/gen/osh-types.h
}
View
@@ -7,7 +7,7 @@ set -o errexit
# TODO: This changes depending on the version. Maybe there should be a 'clang'
# function for things that really require clang, like code coverage and so
# forth.
readonly CLANG_DIR=~/install/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-16.04
readonly CLANG_DIR=$PWD/_deps/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-16.04
readonly CLANG=$CLANG_DIR/bin/clang
readonly CLANGXX=$CLANG_DIR/bin/clang++
View
@@ -12,7 +12,7 @@
import sys
from asdl.gen_cpp import FormatLines
from asdl.visitor import FormatLines
from osh.meta import Id, Kind, LookupKind, ID_SPEC