Compiler
Developers
on
Regions of code
require
Preciseperformance evaluation
need
Correctnesschecking
3
Slide 4
Slide 4 text
An
Unit-test framework for correctness checking
SkyPat
Leverages perf_event for precise evaluation
4
Slide 5
Slide 5 text
#include
// In MathCase, fibonacci_test
PAT_F(MathCase, fibonacci_test)
{
ASSERT_TRUE(fibonacci(3) == 3);
EXPECT_EQ(fibonacci(3), 3);
PERFORM {
fibonacci(3);
}
}
A glace at SkyPat
5
Slide 6
Slide 6 text
#include
// In MathCase, fibonacci_test
PAT_F(MathCase, fibonacci_test)
{
ASSERT_TRUE(fibonacci(3) == 3);
EXPECT_EQ(fibonacci(3), 3);
PERFORM {
fibonacci(3);
}
}
A glace at SkyPat
6
Slide 7
Slide 7 text
M
M
M
T T T T
T T T
T T
C
C
C
Every
casecontains multiple test-functions.
Every
test-function
performs multiple evaluation macros.
An
evaluation macro
could be either ASSERT, EXPECT, or PERFORM.
7
Slide 8
Slide 8 text
8
Loop-Intensive program &
Compiler engineers usually separate programs into
two types
Call-Intensive program
Call intensive programs are
Difficult to Evaluate.
They need
Precise Timer
11
Slide 12
Slide 12 text
12
SkyPAT integrates
“perf_event” to evaluate regions of code.
“perf”
cannotevaluate
regions of code.
“Software Task Clock” is still
not cycle-accurate.
Slide 13
Slide 13 text
SkyPat welcome anyone to develop a
“PMC” without
interference from
OS scheduler
Only
cycle-accurate timer
w/o OS interference
can
evaluate call-intensiveprogram
13
Slide 14
Slide 14 text
1. DownloadSkyPat from our website
2. Use
build-script to build
SkyPat
3. Write your
test-case
4. Compileyour test-case
14
$ git clone https://code.google.com/p/pat/
$ ./pat/utils/build-script/build.sh [src folder] normal
$ cd build-pat-normal; make install
$ vim MathCase.cpp
$ g++ -I/home/user/pat/include MathCase.cpp