diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-12 23:27:51 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-12 23:27:51 -0400 |
commit | 269025c216e4245f2b10927630130db89fddf4c8 (patch) | |
tree | 49f513db666af952d38cdfda6d7ae2c6de6f4f82 /scripts/test_get_arrays.py | |
parent | 4538f7e4fcaa3bf199377b9b735562e53cd1c7d3 (diff) |
Add various test scripts
- also useful for normal debugging, not just PM
Diffstat (limited to 'scripts/test_get_arrays.py')
-rw-r--r-- | scripts/test_get_arrays.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/test_get_arrays.py b/scripts/test_get_arrays.py new file mode 100644 index 0000000..cfe9fa7 --- /dev/null +++ b/scripts/test_get_arrays.py | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/usr/bin/python | ||
2 | # | ||
3 | # test_get_arrays: test program to verify and test C to Python pm interface | ||
4 | # | ||
5 | # recall: PYTHONPATH=".." python test_get_arrays.py :) | ||
6 | # | ||
7 | import sys, pm | ||
8 | |||
9 | args = sys.argv[1:] | ||
10 | if len(args) != 1: | ||
11 | print "Filename required" | ||
12 | sys.exit(-1) | ||
13 | |||
14 | pm.load(args[0],0,4) | ||
15 | x = pm.getPreemption() | ||
16 | y = pm.getOnChipMigration() | ||
17 | z = pm.getL2Migration() | ||
18 | w = pm.getOffChipMigration() | ||
19 | print "preemption: " | ||
20 | print x | ||
21 | print "samechip:" | ||
22 | print y | ||
23 | print "l2:" | ||
24 | print z | ||
25 | print "offchip" | ||
26 | print w | ||