[SERVER-70844] Add stable printing of sbe vm::CodeFragment Created: 25/Oct/22  Updated: 29/Oct/23  Resolved: 15/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Anna Wawrzyniak Assignee: Anna Wawrzyniak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 162

 Description   

Sbe vm::CodeFragment pretty printing includes the memory addresses and accessor addresses. This makes printing non-repeatable as it is dependent on memory layout.

We should add option for vm::CodeFragment printing to print in repeatable way. This would allow for using the print output in unit tests.

1) Instruction pointers can be printed with starting offset of 0.

2) Slot addresses need to be replaced by slotId (it is unavailable to CodeFragment) or just masked out/omitted.

 



 Comments   
Comment by David Storch [ 15/Nov/22 ]

anna.wawrzyniak@mongodb.com I'm re-opening so that this gets closed as "fixed" rather than "done".

Comment by Githook User [ 10/Nov/22 ]

Author:

{'name': 'Anna Wawrzyniak', 'email': 'anna.wawrzyniak@mongodb.com', 'username': 'anna-wawrzyniak'}

Message: SERVER-70844 Fix vm::CodeFragment::toString()
Branch: master
https://github.com/mongodb/mongo/commit/ece191c8770ed32fed20781f66a88637030a5840

Comment by Githook User [ 08/Nov/22 ]

Author:

{'name': 'Anna Wawrzyniak', 'email': 'anna.wawrzyniak@mongodb.com', 'username': 'anna-wawrzyniak'}

Message: SERVER-70844 Add stable printing of sbe vm::CodeFragment
Branch: master
https://github.com/mongodb/mongo/commit/c0dddb21a7d69ea6384be031fd91026d025fd452

Generated at Thu Feb 08 06:17:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.