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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário