mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-29 09:36:17 +00:00
6614a48418
This eliminates the need to remember to call PERF_TIMER_STOP when a section has been timed. This allows more useful design with the perf timers and enables possible return value optimizations. Simplistic example: class Foo { public: Foo(int v) : m_v(v); private: int m_v; } Foo makeFrobbedFoo(int *errno) { *errno = 0; return Foo(); } Foo bar(int *errno) { PERF_TIMER_GUARD(some_timer); return makeFrobbedFoo(errno); } int main(int argc, char[] argv) { Foo f; int errno; f = bar(&errno); if (errno) return -1; return 0; } After bar() is called, perf_context.some_timer would be incremented as if Stop(&perf_context.some_timer) was called at the end, and the compiler is still able to produce optimizations on the return value from makeFrobbedFoo() through to main(). |
||
---|---|---|
.. | ||
arena.cc | ||
arena.h | ||
arena_test.cc | ||
auto_roll_logger.cc | ||
auto_roll_logger.h | ||
auto_roll_logger_test.cc | ||
autovector.h | ||
autovector_test.cc | ||
benchharness.cc | ||
benchharness.h | ||
benchharness_test.cc | ||
blob_store.cc | ||
blob_store.h | ||
blob_store_test.cc | ||
bloom.cc | ||
bloom_test.cc | ||
build_version.h | ||
cache.cc | ||
cache_test.cc | ||
coding.cc | ||
coding.h | ||
coding_test.cc | ||
comparator.cc | ||
crc32c.cc | ||
crc32c.h | ||
crc32c_test.cc | ||
db_info_dummper.cc | ||
dynamic_bloom.cc | ||
dynamic_bloom.h | ||
dynamic_bloom_test.cc | ||
env.cc | ||
env_hdfs.cc | ||
env_posix.cc | ||
env_test.cc | ||
filelock_test.cc | ||
filter_policy.cc | ||
hash.cc | ||
hash.h | ||
hash_cuckoo_rep.cc | ||
hash_cuckoo_rep.h | ||
hash_linklist_rep.cc | ||
hash_linklist_rep.h | ||
hash_skiplist_rep.cc | ||
hash_skiplist_rep.h | ||
histogram.cc | ||
histogram.h | ||
histogram_test.cc | ||
iostats_context.cc | ||
iostats_context_imp.h | ||
ldb_cmd.cc | ||
ldb_cmd.h | ||
ldb_cmd_execute_result.h | ||
ldb_tool.cc | ||
log_buffer.cc | ||
log_buffer.h | ||
log_write_bench.cc | ||
logging.cc | ||
logging.h | ||
manual_compaction_test.cc | ||
murmurhash.cc | ||
murmurhash.h | ||
mutexlock.h | ||
options.cc | ||
options_builder.cc | ||
options_test.cc | ||
perf_context.cc | ||
perf_context_imp.h | ||
posix_logger.h | ||
random.h | ||
rate_limiter.cc | ||
rate_limiter.h | ||
rate_limiter_test.cc | ||
signal_test.cc | ||
skiplistrep.cc | ||
slice.cc | ||
statistics.cc | ||
statistics.h | ||
status.cc | ||
stl_wrappers.h | ||
stop_watch.h | ||
string_util.cc | ||
string_util.h | ||
sync_point.cc | ||
sync_point.h | ||
testharness.cc | ||
testharness.h | ||
testutil.cc | ||
testutil.h | ||
thread_local.cc | ||
thread_local.h | ||
thread_local_test.cc | ||
vectorrep.cc | ||
xxhash.cc | ||
xxhash.h |