Skip to content

Commit 7e2825e

Browse files
author
James Miller
committed
---
yaml --- r: 66127 b: refs/heads/master c: 66d8e8b h: refs/heads/master i: 66125: c64caaa 66123: 64a1c0c 66119: 2c29ea4 66111: f0fe15d v: v3
1 parent e2d0933 commit 7e2825e

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b4b2cbb299842a6854a7e82e745b8a9b63c8d6b9
2+
refs/heads/master: 66d8e8b481a487d372936c553bf7a6d7435056c7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,6 @@ fn fcx_has_nonzero_span(fcx: fn_ctxt) -> bool {
138138
}
139139
}
140140

141-
pub fn log_fn_time(ccx: @mut CrateContext, name: ~str, start: time::Timespec,
142-
end: time::Timespec) {
143-
let elapsed = 1000 * ((end.sec - start.sec) as int) +
144-
((end.nsec as int) - (start.nsec as int)) / 1000000;
145-
ccx.stats.fn_times.push((name, elapsed));
146-
}
147-
148141
pub fn decl_fn(llmod: ModuleRef,
149142
name: &str,
150143
cc: lib::llvm::CallConv,
@@ -1962,7 +1955,7 @@ pub fn trans_fn(ccx: @mut CrateContext,
19621955
|_bcx| { });
19631956
if do_time {
19641957
let end = time::get_time();
1965-
log_fn_time(ccx, the_path_str, start, end);
1958+
ccx.log_fn_time(the_path_str, start, end);
19661959
}
19671960
}
19681961

@@ -3130,11 +3123,6 @@ pub fn trans_crate(sess: session::Session,
31303123
io::println(fmt!("n_closures: %u", ccx.stats.n_closures));
31313124
}
31323125

3133-
if ccx.sess.count_llvm_insns() {
3134-
for ccx.stats.llvm_insns.each |&k, &v| {
3135-
io::println(fmt!("%-7u %s", v, k));
3136-
}
3137-
}
31383126
let llcx = ccx.llcx;
31393127
let link_meta = ccx.link_meta;
31403128
let llmod = ccx.llmod;

trunk/src/librustc/middle/trans/context.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use core::hash;
3131
use core::hashmap::{HashMap, HashSet};
3232
use core::str;
3333
use core::local_data;
34+
use extra::time;
3435
use syntax::ast;
3536

3637
use middle::trans::common::{ExternMap,tydesc_info,BuilderRef_res,Stats,namegen,addrspace_gen};
@@ -222,6 +223,12 @@ impl CrateContext {
222223
}
223224
}
224225
}
226+
227+
pub fn log_fn_time(&mut self, name: ~str, start: time::Timespec, end: time::Timespec) {
228+
let elapsed = 1000 * ((end.sec - start.sec) as int) +
229+
((end.nsec as int) - (start.nsec as int)) / 1000000;
230+
self.stats.fn_times.push((name, elapsed));
231+
}
225232
}
226233

227234
#[unsafe_destructor]

trunk/src/librustc/middle/trans/glue.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,7 @@ pub fn make_generic_glue(ccx: @mut CrateContext,
731731
let start = time::get_time();
732732
let llval = make_generic_glue_inner(ccx, t, llfn, helper);
733733
let end = time::get_time();
734-
log_fn_time(ccx,
735-
fmt!("glue %s %s", name, ty_to_short_str(ccx.tcx, t)),
736-
start,
737-
end);
734+
ccx.log_fn_time(fmt!("glue %s %s", name, ty_to_short_str(ccx.tcx, t)), start, end);
738735
return llval;
739736
}
740737

0 commit comments

Comments
 (0)