Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
  • Loading branch information
garazdawi committed Jan 10, 2022
2 parents 95cb385 + 33959fa commit a452127
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
export ERL_TOP=`pwd`
export MAKEFLAGS=-j4
export ERLC_USE_SERVER=true
export ERTS_SKIP_DEPEND=true
eval `./otp_build env_win32 x64`
./otp_build configure
if cat erts/CONF_INFO || cat lib/*/CONF_INFO || cat lib/*/SKIP || cat lib/SKIP-APPLICATIONS; then exit 1; fi
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/erl_msacc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "erl_msacc.h"
#include "erl_bif_table.h"

#if ERTS_ENABLE_MSACC
#ifdef ERTS_ENABLE_MSACC

static Eterm erts_msacc_gather_stats(ErtsMsAcc *msacc, ErtsHeapFactory *factory);
static void erts_msacc_reset(ErtsMsAcc *msacc);
Expand Down
11 changes: 11 additions & 0 deletions erts/emulator/test/statistics_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
%% Tests the statistics/1 bif.

-export([all/0, suite/0, groups/0,
init_per_testcase/2,
wall_clock_sanity/1,
wall_clock_zero_diff/1, wall_clock_update/1,
runtime_sanity/1,
Expand Down Expand Up @@ -61,6 +62,16 @@ groups() ->
[runtime_sanity, runtime_zero_diff, runtime_update, runtime_diff]},
{run_queue, [], [run_queue_one]}].

init_per_testcase(msacc, Config) ->
try erlang:statistics(microstate_accounting) of
_ ->
Config
catch _:_ ->
{skip, "Microstate accouning not available"}
end;
init_per_testcase(_, Config) ->
Config.

wall_clock_sanity(Config) when is_list(Config) ->
erlang:yield(),
{WallClock, _} = statistics(wall_clock),
Expand Down
13 changes: 12 additions & 1 deletion lib/runtime_tools/test/msacc_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
-include_lib("common_test/include/ct.hrl").

%% Test server callbacks
-export([suite/0, all/0]).
-export([suite/0, all/0, init_per_suite/1, end_per_suite/1]).

%% Test cases
-export([
Expand All @@ -49,6 +49,17 @@ suite() -> [
{ct_hooks,[ts_install_cth]}
].

init_per_suite(Config) ->
try erlang:statistics(microstate_accounting) of
_ ->
Config
catch _:_ ->
{skip, "Microstate accouning not available"}
end.

end_per_suite(_Config) ->
ok.

%%--------------------------------------------------------------------
%% TEST CASES
%%--------------------------------------------------------------------
Expand Down

0 comments on commit a452127

Please sign in to comment.