]> git.lizzy.rs Git - rust.git/commitdiff
Add `push_ctxt` instrumentation to all functions that might call `base::zero_mem`.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 25 Feb 2015 14:45:33 +0000 (15:45 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 26 Feb 2015 14:12:26 +0000 (15:12 +0100)
(Instrumentation work for Issue 22536.)

src/librustc_trans/trans/_match.rs
src/librustc_trans/trans/cleanup.rs
src/librustc_trans/trans/datum.rs
src/librustc_trans/trans/intrinsic.rs

index 9a121a8830b2b8d1b94d41e63e527463db1614f8..48ff4c8332022aac0972c153eade715fbbe7be42 100644 (file)
@@ -1499,6 +1499,7 @@ pub fn store_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     fn create_dummy_locals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
                                        pat: &ast::Pat)
                                        -> Block<'blk, 'tcx> {
+        let _icx = push_ctxt("create_dummy_locals");
         // create dummy memory for the variables if we have no
         // value to store into them immediately
         let tcx = bcx.tcx();
index a3705a67cdc5a4e37f30dbff6bf3e5bdb5b86a3b..cb9156be479d0ac423c3a48f586d11a2218b10a2 100644 (file)
@@ -1007,6 +1007,7 @@ fn trans<'blk>(&self,
                    bcx: Block<'blk, 'tcx>,
                    debug_loc: DebugLoc)
                    -> Block<'blk, 'tcx> {
+        let _icx = base::push_ctxt("<DropValue as Cleanup>::trans");
         let bcx = if self.is_immediate {
             glue::drop_ty_immediate(bcx, self.val, self.ty, debug_loc)
         } else {
index 8262dbf55ddaefe0ca376064cff207eb648c27d9..636c902d3637c32bb57f6d310e71a8fd279a4338 100644 (file)
@@ -311,6 +311,7 @@ fn post_store<'blk, 'tcx>(&self,
                               val: ValueRef,
                               ty: Ty<'tcx>)
                               -> Block<'blk, 'tcx> {
+        let _icx = push_ctxt("<Lvalue as KindOps>::post_store");
         if type_needs_drop(bcx.tcx(), ty) {
             // cancel cleanup of affine values by zeroing out
             let () = zero_mem(bcx, val, ty);
index 993c9eae45bf6326f016693dea46bb25dfe043ec..0706189a56731c58b3f9f3fdcfaeea4edbedaa25 100644 (file)
@@ -156,6 +156,8 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
     let ccx = fcx.ccx;
     let tcx = bcx.tcx();
 
+    let _icx = push_ctxt("trans_intrinsic_call");
+
     let ret_ty = match callee_ty.sty {
         ty::ty_bare_fn(_, ref f) => {
             ty::erase_late_bound_regions(bcx.tcx(), &f.sig.output())