0001-Do-not-initialize-Cycles-globally.patch
src/common/Cycles.cc | ||
---|---|---|
38 | 38 |
#include "Cycles.h" |
39 | 39 | |
40 | 40 |
double Cycles::cycles_per_sec = 0; |
41 |
static Initialize _(Cycles::init); |
|
42 | 41 | |
43 | 42 |
/** |
44 | 43 |
* Perform once-only overall initialization for the Cycles class, such |
45 |
* as calibrating the clock frequency. This method is invoked automatically |
|
46 |
* during initialization, but it may be invoked explicitly by other modules |
|
47 |
* to ensure that initialization occurs before those modules initialize |
|
48 |
* themselves. |
|
44 |
* as calibrating the clock frequency. This method must be called |
|
45 |
* before using the Cycles module. |
|
46 |
* |
|
47 |
* It is not initialized by default because the timing loops cause |
|
48 |
* general process startup times to balloon |
|
49 |
* (http://tracker.ceph.com/issues/15225). |
|
49 | 50 |
*/ |
50 | 51 |
void Cycles::init() |
51 | 52 |
{ |
src/test/msgr/perf_msgr_client.cc | ||
---|---|---|
196 | 196 |
cerr << " message data bytes " << len << std::endl; |
197 | 197 |
MessengerClient client(g_ceph_context->_conf->ms_type, args[0], think_time); |
198 | 198 |
client.ready(concurrent, numjobs, ios, len); |
199 |
Cycles::init(); |
|
199 | 200 |
uint64_t start = Cycles::rdtsc(); |
200 | 201 |
client.start(); |
201 | 202 |
uint64_t stop = Cycles::rdtsc(); |
src/test/msgr/perf_msgr_server.cc | ||
---|---|---|
25 | 25 |
#include "include/atomic.h" |
26 | 26 |
#include "common/ceph_argparse.h" |
27 | 27 |
#include "common/debug.h" |
28 |
#include "common/Cycles.h" |
|
29 | 28 |
#include "global/global_init.h" |
30 | 29 |
#include "msg/Messenger.h" |
31 | 30 |
#include "messages/MOSDOp.h" |
src/test/objectstore/ObjectStoreTransactionBenchmark.cc | ||
---|---|---|
249 | 249 |
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0); |
250 | 250 |
common_init_finish(g_ceph_context); |
251 | 251 |
g_ceph_context->_conf->apply_changes(NULL); |
252 |
Cycles::init(); |
|
252 | 253 | |
253 | 254 |
cerr << "args: " << args << std::endl; |
254 | 255 |
if (args.size() < 1) { |
src/test/perf_local.cc | ||
---|---|---|
1020 | 1020 | |
1021 | 1021 |
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0); |
1022 | 1022 |
common_init_finish(g_ceph_context); |
1023 |
Cycles::init(); |
|
1023 | 1024 | |
1024 | 1025 |
bind_thread_to_cpu(3); |
1025 | 1026 |
if (argc == 1) { |
1026 |
- |