added gprof pthread wrapper