summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Corbacho <diana.corbacho@erlang-solutions.com>2016-01-22 12:45:51 +0000
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2016-02-25 16:05:16 +0100
commite56a3ab64d7f756f1d95e954c227348f0b2381de (patch)
tree6d498e1ddfe42a2c49e350dedee30288392873ad
parenta578f1228b5e0e7ca276ce74738fc446beece07e (diff)
downloadrabbitmq-server-git-e56a3ab64d7f756f1d95e954c227348f0b2381de.tar.gz
Avoid hipe compile versioned modules
References #346. References #347.
-rw-r--r--src/rabbit_hipe.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rabbit_hipe.erl b/src/rabbit_hipe.erl
index 0302d82839..05b5f3719d 100644
--- a/src/rabbit_hipe.erl
+++ b/src/rabbit_hipe.erl
@@ -44,7 +44,8 @@ hipe_compile() ->
%% happens when RabbitMQ is stopped (just the
%% application, not the entire node) and started
%% again.
- already_hipe_compiled(HM)],
+ already_hipe_compiled(HM)
+ andalso (not compiled_with_version_support(HM))],
case HipeModules of
[] -> {ok, already_compiled};
_ -> do_hipe_compile(HipeModules)
@@ -59,6 +60,10 @@ already_hipe_compiled(Mod) ->
code:is_module_native(Mod) =:= false
end.
+compiled_with_version_support(Mod) ->
+ proplists:get_value(erlang_version_support, Mod:module_info(attributes))
+ =/= undefined.
+
do_hipe_compile(HipeModules) ->
Count = length(HipeModules),
io:format("~nHiPE compiling: |~s|~n |",