s_counter should still be defined on non-Linux

- s_counter still needs to be defined somewhere in
NO_HARDWARE_COUNTERS builds
Esse commit está contido em:
Sean Cannella
2013-06-27 11:19:31 -07:00
commit de Sara Golemon
commit 9aaf5ab743
2 arquivos alterados com 17 adições e 2 exclusões
-1
Ver Arquivo
@@ -38,7 +38,6 @@ endforeach(dir ${RECURSIVE_SOURCE_SUBDIRS})
# Disable hardware counters off of Linux
if(NOT LINUX)
add_definitions(-DNO_HARDWARE_COUNTERS)
list(REMOVE_ITEM CXX_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/runtime/base/hardware_counter.cpp)
endif()
# remove ext_hhvm, and anything in a test folder
+17 -1
Ver Arquivo
@@ -14,10 +14,13 @@
+----------------------------------------------------------------------+
*/
#define _GNU_SOURCE 1
#include "hphp/runtime/base/hardware_counter.h"
#ifndef NO_HARDWARE_COUNTERS
#include "hphp/util/logger.h"
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -414,3 +417,16 @@ void HardwareCounter::GetPerfEvents(Array& ret) {
///////////////////////////////////////////////////////////////////////////////
}
#else // NO_HARDWARE_COUNTERS
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
HardwareCounter HardwareCounter::s_counter;
///////////////////////////////////////////////////////////////////////////////
}
#endif // NO_HARDWARE_COUNTERS