[spacetime] two big allocators in some profiles

Summary:
These were showing up as allocation huge amounts of memory on some analysis
profiles from OpenSSL using Spacetime. Doesn't hurt to make them allocate less.

Reviewed By: jeremydubreil

Differential Revision: D4884520

fbshipit-source-id: e79b815
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent c031fef177
commit c8489cb3ac

@ -33,8 +33,14 @@ let to_signed (unsigned, i, ptr) =>
(false, i, ptr)
};
let compare (unsigned1, i1, _) (unsigned2, i2, _) =>
[%compare : (bool, Int64.t)] (unsigned1, i1) (unsigned2, i2);
let compare (unsigned1, i1, _) (unsigned2, i2, _) => {
let n = Bool.compare unsigned1 unsigned2;
if (n != 0) {
n
} else {
Int64.compare i1 i2
}
};
let compare_value (unsigned1, i1, _) (unsigned2, i2, _) =>
[%compare : (int, Int64.t)] (area unsigned1 i1, i1) (area unsigned2 i2, i2);

@ -1808,7 +1808,11 @@ let sub_av_add = sub_fav_add;
let rec exp_sub_ids (f: Ident.t => Exp.t) exp =>
switch (exp: Exp.t) {
| Var id => f id
| Var id =>
switch (f id) {
| Var id' when Ident.equal id id' => exp
| exp' => exp'
}
| Lvar _ => exp
| Exn e =>
let e' = exp_sub_ids f e;

Loading…
Cancel
Save