summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-10-31 16:30:15 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-10-31 16:30:15 +0000
commita84385fa752d8fa800a2155cce95f47c68b74e2b (patch)
tree1b3ad17775a99b9149fbfec56fd8e68760abfe13 /rts/RtsStartup.c
parentbf4d6a58a1079b944ffc4bdd41d57403a7727046 (diff)
downloadhaskell-a84385fa752d8fa800a2155cce95f47c68b74e2b.tar.gz
Refactor PAPI support, and add profiling of multithreaded GC
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index 774de72e38..d1025a3a8b 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -167,28 +167,8 @@ hs_init(int *argc, char **argv[])
argv++; argc--;
#endif
- /* Initialise the performance tracking library */
#ifdef USE_PAPI
- {
- int ver;
- if ((ver = PAPI_library_init(PAPI_VER_CURRENT)) != PAPI_VER_CURRENT) {
- if (ver > 0) {
- errorBelch("PAPI_library_init: wrong version: %x", ver);
- stg_exit(EXIT_FAILURE);
- } else {
- sysErrorBelch("PAPI_library_init");
- stg_exit(EXIT_FAILURE);
- }
- }
- }
-#ifdef THREADED_RTS
- {
- int err;
- if ((err = PAPI_thread_init(osThreadId)) < 0) {
- barf("PAPI_thread_init: %d",err);
- }
- }
-#endif
+ papi_init();
#endif
/* Set the RTS flags to default values. */