aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-09-11 14:45:04 +0200
committerLukas Larsson <[email protected]>2017-09-11 14:45:04 +0200
commitc15bb1698267ae64aac08b3b48040c44174700e5 (patch)
treecba3ff4bdbde104d912200014384f2599aa9f094 /erts/emulator/test
parent87b57377864d3161a79c65e32844d7539d1a9264 (diff)
parenta9812e6307fe335d077f96d3a6342cbd4894ed0b (diff)
downloadotp-c15bb1698267ae64aac08b3b48040c44174700e5.tar.gz
otp-c15bb1698267ae64aac08b3b48040c44174700e5.tar.bz2
otp-c15bb1698267ae64aac08b3b48040c44174700e5.zip
Merge branch 'lukas/erts/pgo/OTP-14604'
* lukas/erts/pgo/OTP-14604: Add support for building a pgo beam_emu
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/estone_SUITE.erl31
1 files changed, 23 insertions, 8 deletions
diff --git a/erts/emulator/test/estone_SUITE.erl b/erts/emulator/test/estone_SUITE.erl
index 8b336b366d..c4899967ca 100644
--- a/erts/emulator/test/estone_SUITE.erl
+++ b/erts/emulator/test/estone_SUITE.erl
@@ -20,7 +20,7 @@
-module(estone_SUITE).
%% Test functions
-export([all/0, suite/0, groups/0,
- estone/1, estone_bench/1]).
+ estone/1, estone_bench/1, pgo/0]).
%% Internal exports for EStone tests
-export([lists/1,
@@ -44,9 +44,9 @@
links/1,lproc/1,
run_micro/3,p1/1,ppp/3,macro/2,micros/0]).
-
--include_lib("common_test/include/ct.hrl").
+-ifndef(PGO).
-include_lib("common_test/include/ct_event.hrl").
+-endif.
%% EStone defines
-define(TOTAL, (3000 * 1000 * 100)). %% 300 secs
@@ -85,13 +85,28 @@ estone(Config) when is_list(Config) ->
estone_bench(Config) ->
DataDir = proplists:get_value(data_dir,Config),
L = ?MODULE:macro(?MODULE:micros(),DataDir),
- [ct_event:notify(
- #event{name = benchmark_data,
- data = [{name,proplists:get_value(title,Mark)},
- {value,proplists:get_value(estones,Mark)}]})
- || Mark <- L],
+ {Total, Stones} = sum_micros(L, 0, 0),
+ notify([[{title,"ESTONES"}, {estones, Stones}] | L]),
L.
+-ifndef(PGO).
+notify(Marks) ->
+ [ct_event:notify(
+ #event{name = benchmark_data,
+ data = [{name,proplists:get_value(title, Mark)},
+ {value,proplists:get_value(estones, Mark)}]})
+ || Mark <- Marks].
+-else.
+notify(_) ->
+ ok.
+-endif.
+
+%% The benchmarks to run in order to guide PGO (profile guided optimisation)
+pgo() ->
+ %% We run all benchmarks except the port_io as we don't want to
+ %% have to build a custom port.
+ Micros = ?MODULE:micros() -- [micro(port_io)],
+ ?MODULE:macro(Micros,[]).
%%
%% Calculate CPU speed