mirror of
https://github.com/google/benchmark.git
synced 2025-04-29 22:40:33 +08:00
Fixed linking and threading analyzer issues.
This commit is contained in:
parent
16d5f2ab67
commit
dd29368350
@ -994,7 +994,7 @@ class BENCHMARK_EXPORT State {
|
||||
};
|
||||
|
||||
// ThreadState can be used in a manually multithreaded benchmark loop.
|
||||
class ThreadState : public State {
|
||||
class BENCHMARK_EXPORT ThreadState : public State {
|
||||
public:
|
||||
explicit ThreadState(State& s);
|
||||
~ThreadState();
|
||||
|
@ -121,7 +121,7 @@ void BenchmarkInstance::Teardown() const {
|
||||
}
|
||||
|
||||
void MergeResults(const State& st, const ThreadTimer* timer,
|
||||
ThreadManager* manager) {
|
||||
ThreadManager* manager) NO_THREAD_SAFETY_ANALYSIS {
|
||||
ThreadManager::Result& results = manager->results;
|
||||
results.iterations += st.iterations();
|
||||
results.cpu_time_used += timer->cpu_time_used();
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "benchmark/benchmark.h"
|
||||
#include "commandlineflags.h"
|
||||
#include "mutex.h"
|
||||
|
||||
namespace benchmark {
|
||||
namespace internal {
|
||||
@ -83,8 +84,8 @@ bool FindBenchmarksInternal(const std::string& re,
|
||||
|
||||
bool IsZero(double n);
|
||||
|
||||
void MergeResults(const State& st, const ThreadTimer* timer,
|
||||
ThreadManager* manager);
|
||||
void MergeResults(const State& st, const ThreadTimer* timer, // only call while holding benchmark_mutex_
|
||||
ThreadManager* manager) NO_THREAD_SAFETY_ANALYSIS;
|
||||
|
||||
BENCHMARK_EXPORT
|
||||
ConsoleReporter::OutputOptions GetOutputOptions(bool force_no_color = false);
|
||||
|
Loading…
Reference in New Issue
Block a user