summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 178166402d3..2f968ca4979 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -158,12 +158,8 @@ namespace mongo {
_dbprofile = std::max( context->_db ? context->_db->getProfilingLevel() : 0 , _dbprofile );
}
- void CurOp::recordGlobalTime( long long micros ) const {
- if ( _client ) {
- const LockState& ls = _client->lockState();
- verify( ls.threadState() );
- Top::global.record( _ns , _op , ls.isWriteLocked() ? 1 : -1 , micros , _isCommand );
- }
+ void CurOp::recordGlobalTime(bool isWriteLocked, long long micros) const {
+ Top::global.record(_ns, _op, isWriteLocked ? 1 : -1, micros, _isCommand);
}
void CurOp::reportState(BSONObjBuilder* builder) {