Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

doInsertRecords query

38 views
Skip to first unread message

Mohak Goel

unread,
Sep 26, 2024, 6:28:44 AM9/26/24
to wiredtiger-users
Hi,

In arm we can see doInsertRecords is called after insertRecords function but in x86 insertRecords is directly calling _insertRecords function why?

I have seen this through perf data.

ARM -->
10.26%--mongo::RecordStore::insertRecords(mongo::OperationContext*, std::vector<mongo::Record, std::allocator<mongo::Record> >*, std::vector<mongo::Timestamp, std::allocator<mongo::Timestamp> > const&) | | | | | | | | | | | | | | | | | | | | | | | | | | | | --10.19%--mongo::WiredTigerRecordStore::doInsertRecords(mongo::OperationContext*, std::vector<mongo::Record, std::allocator<mongo::Record> >*, std::vector<mongo::Timestamp, std::allocator<mongo::Timestamp> > const&) | | | | | | | | | | | | | | | | | | | | | | | | | | | | --10.09%--mongo::WiredTigerRecordStore::_insertRecords(mongo::OperationContext*, mongo::Record*, mongo::Timestamp const*, unsigned long) | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |--4.25%--mongo::wiredTigerCursorInsert(mongo::OperationContext*, __wt_cursor*) | | 


x86 -->
 | | | | | | | | | | | | | | | 8.34%--mongo::WiredTigerRecordStore::insertRecords(mongo::OperationContext*, std::vector<mongo::Record, std::allocator<mongo::Record> >*, std::vector<mongo::Timestamp, std::allocator<mongo::Timestamp> > const&) | | | | | | | | | | | | | | | | | | | | | | | | | | --8.09%--mongo::WiredTigerRecordStore::_insertRecords(mongo::OperationContext*, mongo::Record*, mongo::Timestamp const*, unsigned long) | | | | | | | | | | | | | | | | | | | | | | | | | | | |--3.72%--mongo::WiredTigerCursor::WiredTigerCursor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, bool, mongo::OperationContext*) | | | | | | | | | | | | | |     

Etienne Petrel

unread,
Sep 26, 2024, 11:10:13 PM9/26/24
to wiredtiger-users
Hi Mohak,

You may have received my answer already - I hit the "reply to" button instead of "reply all", apologies for the duplicate.

The question you are asking is about some code the WiredTiger team does not own and sits at a layer above. I reached out to the right team and here is their answer:

Most likely the compiler chose different inlining strategies for different architectures. This is expected: it is a good thing that the compiler does not assume that ARM and X86 will have identical performance characteristics for their ICaches, and so generate the same inlinings. The code in question isn't platform specific per-se
https://github.com/mongodb/mongo/blob/25d25f617e2f31e28631b952725589bdc742fc20/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L870

If you have further questions about this code or anything that is outside WiredTiger but inside the MongoDB repo, it is recommended to use the following page: https://www.mongodb.com/community/forums/.

I hope this helps! 

Regards

Etienne

Reply all
Reply to author
Forward
0 new messages