diff options
author | Patrik Nyblom <[email protected]> | 2012-02-07 19:51:24 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-02-07 19:51:24 +0100 |
commit | d0394af6541d99bd72192d35fc4986016c3a6589 (patch) | |
tree | 8251b6147db0ea64f90b25b941d951c58bb150a2 /erts/emulator/beam/erl_bif_info.c | |
parent | e9e34e8bd838ef99ed3bd0e88ff490614cbe78a1 (diff) | |
parent | 6004ec3e1785913ff0b74054cf614a35c180d54a (diff) | |
download | otp-d0394af6541d99bd72192d35fc4986016c3a6589.tar.gz otp-d0394af6541d99bd72192d35fc4986016c3a6589.tar.bz2 otp-d0394af6541d99bd72192d35fc4986016c3a6589.zip |
Merge branch 'maint'
Conflicts:
erts/doc/src/erlang.xml
erts/preloaded/ebin/erlang.beam
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 5a806777fe..ebd475f73a 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -57,6 +57,8 @@ static Export* alloc_info_trap = NULL; static Export* alloc_sizes_trap = NULL; +static Export *gather_sched_wall_time_res_trap; + #define DECL_AM(S) Eterm AM_ ## S = am_atom_put(#S, sizeof(#S) - 1) /* Keep erts_system_version as a global variable for easy access from a core */ @@ -3180,7 +3182,12 @@ BIF_RETTYPE statistics_1(BIF_ALIST_1) Eterm res; Eterm* hp; - if (BIF_ARG_1 == am_context_switches) { + if (BIF_ARG_1 == am_scheduler_wall_time) { + res = erts_sched_wall_time_request(BIF_P, 0, 0); + if (is_non_value(res)) + BIF_RET(am_undefined); + BIF_TRAP1(gather_sched_wall_time_res_trap, BIF_P, res); + } else if (BIF_ARG_1 == am_context_switches) { Eterm cs = erts_make_integer(erts_get_total_context_switches(), BIF_P); hp = HAlloc(BIF_P, 3); res = TUPLE2(hp, cs, SMALL_ZERO); @@ -4160,6 +4167,8 @@ erts_bif_info_init(void) alloc_info_trap = erts_export_put(am_erlang, am_alloc_info, 1); alloc_sizes_trap = erts_export_put(am_erlang, am_alloc_sizes, 1); + gather_sched_wall_time_res_trap + = erts_export_put(am_erlang, am_gather_sched_wall_time_result, 1); process_info_init(); os_info_init(); } |