1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
6 #include "util/sync_point.h"
7 #include "util/sync_point_impl.h"
9 int rocksdb_kill_odds
= 0;
10 std::vector
<std::string
> rocksdb_kill_prefix_blacklist
;
15 SyncPoint
* SyncPoint::GetInstance() {
16 static SyncPoint sync_point
;
20 SyncPoint::SyncPoint() :
24 SyncPoint:: ~SyncPoint() {
28 void SyncPoint::LoadDependency(const std::vector
<SyncPointPair
>& dependencies
) {
29 impl_
->LoadDependency(dependencies
);
32 void SyncPoint::LoadDependencyAndMarkers(
33 const std::vector
<SyncPointPair
>& dependencies
,
34 const std::vector
<SyncPointPair
>& markers
) {
35 impl_
->LoadDependencyAndMarkers(dependencies
, markers
);
38 void SyncPoint::SetCallBack(const std::string
& point
,
39 const std::function
<void(void*)>& callback
) {
40 impl_
->SetCallBack(point
, callback
);
43 void SyncPoint::ClearCallBack(const std::string
& point
) {
44 impl_
->ClearCallBack(point
);
47 void SyncPoint::ClearAllCallBacks() {
48 impl_
->ClearAllCallBacks();
51 void SyncPoint::EnableProcessing() {
52 impl_
->EnableProcessing();
55 void SyncPoint::DisableProcessing() {
56 impl_
->DisableProcessing();
59 void SyncPoint::ClearTrace() {
63 void SyncPoint::Process(const std::string
& point
, void* cb_arg
) {
64 impl_
->Process(point
, cb_arg
);
67 } // namespace rocksdb