svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: Santosh Nagarakatte <santoshn AT cis.upenn.edu>
- To: svadev AT cs.uiuc.edu
- Subject: [svadev] Huge overhead as a result of checks being not inlined
- Date: Tue, 6 Dec 2011 02:33:33 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
SafeCode developers,
I built SafeCode from the svn and tried to run it with a simple test
program which performs many array accesses.
I have attached the test program. Resultant binary has many function
calls to the safecode handler functions (exactcheck2_debug,
poolcheckui_debug). However, I noticed that a combination of
non-inlined functions along with spills makes safecode extremely slow
(65X slower).
Following are the details and a sample test case.
I used the following command-line to perform the runtime tests.
Baseline: clang -O3 test-combined.c -o test-clang.out
Safecode: clang -O3 -fmemsafety test-combined.c -o test-safecode.out
-L<safecode_lib_path>
Execution time results on a Core 2 x86_64 machine:
Baseline: 1.626s
SafeCode: 105.49s
Let me know if there is a way I can inline the SafeCode checks?
Santosh
--
Santosh G Nagarakatte,
PhD Student,
Computer and Information Science Department
University of Pennsylvania,
Philadelphia-19104
http://www.cis.upenn.edu/~santoshn
--
Santosh G Nagarakatte,
PhD Student,
Computer and Information Science Department
University of Pennsylvania,
Philadelphia-19104
http://www.cis.upenn.edu/~santoshn
#include <stdlib.h> #include <stdio.h> #define SIZE (16*16*2) #define ITER (SIZE*1024*1024*3) void foo() { printf("Hello World\n"); } int main(int argc, char** argv) { size_t i; size_t *arr = (size_t*)malloc(sizeof(size_t)*SIZE); size_t sum = 0; // init for (i=0; i<SIZE; i++) { arr[i] = i; } // loop for (i=0; i<ITER; i++) { // sum += arr[i]; size_t index = i % SIZE; sum += arr[index]; } printf("sum: %d\n", (int) sum); // foo(); return 0; }
- [svadev] Huge overhead as a result of checks being not inlined, Santosh Nagarakatte, 12/06/2011
- Re: [svadev] Huge overhead as a result of checks being not inlined, John Criswell, 12/06/2011
- Re: [svadev] Huge overhead as a result of checks being not inlined, Santosh Nagarakatte, 12/07/2011
- Re: [svadev] Huge overhead as a result of checks being not inlined, John Criswell, 12/06/2011
Archive powered by MHonArc 2.6.16.