Skip to content

Commit 2d0e6ca

Browse files
committed
Add push_ctxt instrumentation to all functions that might call base::zero_mem.
(Instrumentation work for Issue 22536.)
1 parent 41f8b1e commit 2d0e6ca

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

src/librustc_trans/trans/_match.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,7 @@ pub fn store_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
14991499
fn create_dummy_locals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
15001500
pat: &ast::Pat)
15011501
-> Block<'blk, 'tcx> {
1502+
let _icx = push_ctxt("create_dummy_locals");
15021503
// create dummy memory for the variables if we have no
15031504
// value to store into them immediately
15041505
let tcx = bcx.tcx();

src/librustc_trans/trans/cleanup.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ impl<'tcx> Cleanup<'tcx> for DropValue<'tcx> {
10071007
bcx: Block<'blk, 'tcx>,
10081008
debug_loc: DebugLoc)
10091009
-> Block<'blk, 'tcx> {
1010+
let _icx = base::push_ctxt("<DropValue as Cleanup>::trans");
10101011
let bcx = if self.is_immediate {
10111012
glue::drop_ty_immediate(bcx, self.val, self.ty, debug_loc)
10121013
} else {

src/librustc_trans/trans/datum.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ impl KindOps for Lvalue {
311311
val: ValueRef,
312312
ty: Ty<'tcx>)
313313
-> Block<'blk, 'tcx> {
314+
let _icx = push_ctxt("<Lvalue as KindOps>::post_store");
314315
if type_needs_drop(bcx.tcx(), ty) {
315316
// cancel cleanup of affine values by zeroing out
316317
let () = zero_mem(bcx, val, ty);

src/librustc_trans/trans/intrinsic.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
156156
let ccx = fcx.ccx;
157157
let tcx = bcx.tcx();
158158

159+
let _icx = push_ctxt("trans_intrinsic_call");
160+
159161
let ret_ty = match callee_ty.sty {
160162
ty::ty_bare_fn(_, ref f) => {
161163
ty::erase_late_bound_regions(bcx.tcx(), &f.sig.output())

0 commit comments

Comments
 (0)