From cf99089f84d53b607b8b9493e04bdd0c063c21ea Mon Sep 17 00:00:00 2001 From: Zhongwen Deng Date: Tue, 17 Jan 2023 20:18:20 +0800 Subject: [PATCH] chore: add some trace func to user_default --- apps/emqx_machine/src/user_default.erl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/emqx_machine/src/user_default.erl b/apps/emqx_machine/src/user_default.erl index ce5397c26..3e561b929 100644 --- a/apps/emqx_machine/src/user_default.erl +++ b/apps/emqx_machine/src/user_default.erl @@ -26,6 +26,14 @@ %% API -export([lock/0, unlock/0]). +-export([t/1, t2/1, t/2, t2/2, t/3, t2/3]). lock() -> emqx_restricted_shell:lock(). unlock() -> emqx_restricted_shell:unlock(). + +t(M) -> recon_trace:calls({M, '_', return_trace}, 300). +t2(M) -> recon_trace:calls({M, '_', return_trace}, 300, [{args, arity}]). +t(M, F) -> recon_trace:calls({M, F, return_trace}, 300). +t2(M, F) -> recon_trace:calls({M, F, return_trace}, 300, [{args, arity}]). +t(M, F, A) -> recon_trace:calls({M, F, A}, 300). +t2(M, F, A) -> recon_trace:calls({M, F, A}, 300, [{args, arity}]).