* will work just fine.
*/
-#ifdef __linux__
+#if defined(__linux__) && defined(HAVE_PERF_EVENT_H)
struct perf_counter {
const char *name;
bool once;
#else
-#define PERF_FUNCTON_COUNT_BEGIN
-#define PERF_FUNCTON_COUNT_END
+#define PERF_FUNCTON_BEGIN
+#define PERF_FUNCTON_END
static inline void perf_counters_init(void) {}
static inline void perf_counters_destroy(void) {}
static inline char *
perf_counters_to_string(void)
{
- return xstrdup("Not Supported on this platform. Only available on Linux.");
+ return xstrdup("Not Supported on this platform. Only available on Linux (version >= 2.6.32)");
}
#endif