problem using ffi with profiling