Bug #15225 » 0001-Do-not-initialize-Cycles-globally.patch
src/common/Cycles.cc | ||
---|---|---|
#include "Cycles.h"
|
||
double Cycles::cycles_per_sec = 0;
|
||
static Initialize _(Cycles::init);
|
||
/**
|
||
* Perform once-only overall initialization for the Cycles class, such
|
||
* as calibrating the clock frequency. This method is invoked automatically
|
||
* during initialization, but it may be invoked explicitly by other modules
|
||
* to ensure that initialization occurs before those modules initialize
|
||
* themselves.
|
||
* as calibrating the clock frequency. This method must be called
|
||
* before using the Cycles module.
|
||
*
|
||
* It is not initialized by default because the timing loops cause
|
||
* general process startup times to balloon
|
||
* (http://tracker.ceph.com/issues/15225).
|
||
*/
|
||
void Cycles::init()
|
||
{
|
src/test/msgr/perf_msgr_client.cc | ||
---|---|---|
cerr << " message data bytes " << len << std::endl;
|
||
MessengerClient client(g_ceph_context->_conf->ms_type, args[0], think_time);
|
||
client.ready(concurrent, numjobs, ios, len);
|
||
Cycles::init();
|
||
uint64_t start = Cycles::rdtsc();
|
||
client.start();
|
||
uint64_t stop = Cycles::rdtsc();
|
src/test/msgr/perf_msgr_server.cc | ||
---|---|---|
#include "include/atomic.h"
|
||
#include "common/ceph_argparse.h"
|
||
#include "common/debug.h"
|
||
#include "common/Cycles.h"
|
||
#include "global/global_init.h"
|
||
#include "msg/Messenger.h"
|
||
#include "messages/MOSDOp.h"
|
src/test/objectstore/ObjectStoreTransactionBenchmark.cc | ||
---|---|---|
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
|
||
common_init_finish(g_ceph_context);
|
||
g_ceph_context->_conf->apply_changes(NULL);
|
||
Cycles::init();
|
||
cerr << "args: " << args << std::endl;
|
||
if (args.size() < 1) {
|
src/test/perf_local.cc | ||
---|---|---|
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
|
||
common_init_finish(g_ceph_context);
|
||
Cycles::init();
|
||
bind_thread_to_cpu(3);
|
||
if (argc == 1) {
|
- « Previous
- 1
- 2
- Next »