-
Notifications
You must be signed in to change notification settings - Fork 0
/
incll_globals.hh
70 lines (56 loc) · 1.71 KB
/
incll_globals.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Modification of Masstree
* VLSC Laboratory
* Copyright (c) 2018-2019 Ecole Polytechnique Federale de Lausanne
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, subject to the conditions
* listed in the Masstree LICENSE file. These conditions include: you must
* preserve this copyright notice, and you cannot mention the copyright
* holders in advertising related to the Software without their permission.
* The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. This
* notice is a summary of the Masstree LICENSE file; the license in that file
* is legally binding.
*/
/*
* Global Helper
* global variables in one struct, like a namespace
*/
#pragma once
#include <iostream>
#include "incll_barrier.hh"
#include "incll_gf.hh"
#include "incll_configs.hh"
#include "incll_pextlog.hh"
#include "incll_bl.hh"
#ifdef MTAN
void report_mtan();
#endif
namespace GH{
extern ThreadBarrier thread_barrier;
#ifdef INCLL
extern BucketLocks bucket_locks;
#endif
extern std::string exp_name;
extern uint64_t n_keys;
extern uint64_t n_initops;
extern uint64_t n_ops1;
extern uint64_t n_ops2;
extern int get_rate;
extern int put_rate;
extern int rem_rate;
extern int scan_rate;
void check_rate(int rate);
#ifdef GLOBAL_FLUSH
extern GlobalFlush global_flush;
#endif
#ifdef EXTLOG
extern thread_local PExtNodeLogger *node_logger;
extern PLogAllocator plog_allocator;
bool is_recovery();
#endif //extlog
void print_exp_params();
void init_all(int nthreads, const char *testname);
void init_thread_all(int tid);
void advance_epoch(int tid, void *root);
};