Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison lib/ExecutionEngine/IntelJITEvents/jitprofiling.c @ 83:60c9769439b8
LLVM 3.7
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 14:55:36 +0900 |
parents | 95c75e76d11b |
children | 803732b1fca8 |
comparison
equal
deleted
inserted
replaced
78:af83660cff7b | 83:60c9769439b8 |
---|---|
22 #include <windows.h> | 22 #include <windows.h> |
23 #pragma optimize("", off) | 23 #pragma optimize("", off) |
24 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 24 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
25 #include <pthread.h> | 25 #include <pthread.h> |
26 #include <dlfcn.h> | 26 #include <dlfcn.h> |
27 #include <stdint.h> | |
27 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 28 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
28 #include <malloc.h> | 29 #include <malloc.h> |
29 #include <stdlib.h> | 30 #include <stdlib.h> |
30 | 31 |
31 #include "jitprofiling.h" | 32 #include "jitprofiling.h" |
369 } | 370 } |
370 | 371 |
371 #if ITT_PLATFORM==ITT_PLATFORM_WIN | 372 #if ITT_PLATFORM==ITT_PLATFORM_WIN |
372 FUNC_NotifyEvent = (TPNotify)GetProcAddress(m_libHandle, "NotifyEvent"); | 373 FUNC_NotifyEvent = (TPNotify)GetProcAddress(m_libHandle, "NotifyEvent"); |
373 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 374 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
374 FUNC_NotifyEvent = (TPNotify)dlsym(m_libHandle, "NotifyEvent"); | 375 FUNC_NotifyEvent = (TPNotify)(intptr_t)dlsym(m_libHandle, "NotifyEvent"); |
375 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 376 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
376 if (!FUNC_NotifyEvent) | 377 if (!FUNC_NotifyEvent) |
377 { | 378 { |
378 FUNC_Initialize = NULL; | 379 FUNC_Initialize = NULL; |
379 return 0; | 380 return 0; |
380 } | 381 } |
381 | 382 |
382 #if ITT_PLATFORM==ITT_PLATFORM_WIN | 383 #if ITT_PLATFORM==ITT_PLATFORM_WIN |
383 FUNC_Initialize = (TPInitialize)GetProcAddress(m_libHandle, "Initialize"); | 384 FUNC_Initialize = (TPInitialize)GetProcAddress(m_libHandle, "Initialize"); |
384 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 385 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
385 FUNC_Initialize = (TPInitialize)dlsym(m_libHandle, "Initialize"); | 386 FUNC_Initialize = (TPInitialize)(intptr_t)dlsym(m_libHandle, "Initialize"); |
386 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ | 387 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ |
387 if (!FUNC_Initialize) | 388 if (!FUNC_Initialize) |
388 { | 389 { |
389 FUNC_NotifyEvent = NULL; | 390 FUNC_NotifyEvent = NULL; |
390 return 0; | 391 return 0; |