revert perf_context and io_stats to __thread#2485
revert perf_context and io_stats to __thread#2485lightmark wants to merge 2 commits intofacebook:masterfrom
Conversation
|
@lightmark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
| iostats_context.Reset(static_cast<void*>(new IOStatsContext())); | ||
| } | ||
| return static_cast<IOStatsContext*>(iostats_context.Get()); | ||
| return &iostats_context; |
There was a problem hiding this comment.
I don't get it. Will it even compile if ROCKSDB_SUPPORT_THREAD_LOCAL is not set?
There was a problem hiding this comment.
my bad. I will return nullptr if not set.
|
please look into avoiding the call to |
|
@lightmark updated the pull request - view changes - changes since last import |
|
@ajkr yes we should do that too. The cost when perf context is enabled is also important as it's common to have count stats always enabled. For example, MyRocks does that. |
|
|
||
| // perf_context and iostats_context take 2 ids | ||
| ASSERT_EQ(IDChecker::PeekId(), 2u); | ||
| ASSERT_EQ(IDChecker::PeekId(), 0u); |
There was a problem hiding this comment.
I don't get why these numbers need to be changed, but I trust you are doing the right thing.
There was a problem hiding this comment.
Because previously I changed it to use ThreadLocalPtr and there is a global counter summarizes the total number of entries in the ptr. If I add iostats and perf_stats there will two more entries from the start of the db. So for this part, it is just a reversion. Nothing special.
|
@lightmark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Upstream commit ID : fb-mysql-5.6.35/2e0ecaf5ce8cb4a1bb1debbe2269839d88de6f1d Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Upstream commit ID : fb-mysql-5.6.35/2e0ecaf5ce8cb4a1bb1debbe2269839d88de6f1d Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Test Plan: sandcastle and make sure sysbench is back Reviewers: alexyang Reviewed By: alexyang Subscribers: webscalesql-eng@fb.com Differential Revision: https://phabricator.intern.facebook.com/D5520030 Signature: t1:5520030:1501275061:d8cca48eb4c82a7ed51e4a11f97947b996970ed5
Upstream commit ID : fb-mysql-5.6.35/2e0ecaf5ce8cb4a1bb1debbe2269839d88de6f1d Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Upstream commit ID : fb-mysql-5.6.35/2e0ecaf5ce8cb4a1bb1debbe2269839d88de6f1d Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Upstream commit ID : fb-mysql-5.6.35/2e0ecaf5ce8cb4a1bb1debbe2269839d88de6f1d Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2b20883
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Reviewed By: alxyang Differential Revision: D5520030 fbshipit-source-id: 2d04833
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 update-submodule: rocksdb Differential Revision: D5520030 (facebook@a27984c) fbshipit-source-id: 0da3e86fb08
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
Summary: The rocksdb PR facebook/rocksdb#2485 reverted an implementation of rocksdb perf and iostat counters to __thread from rocksdb::ThreadLocal. This change was previously done by PR facebook/rocksdb#2380 @update-submodule: rocksdb Differential Revision: D5520030
#2380 introduces a regression by replacing __thread with ThreadLocalPtr. Revert the thread local implementation back.