diff --git a/c_src/tracer/tpTracerNif.c b/c_src/tracer/tpTracerNif.c index 6d60345..862a813 100644 --- a/c_src/tracer/tpTracerNif.c +++ b/c_src/tracer/tpTracerNif.c @@ -170,7 +170,6 @@ static ERL_NIF_TERM enabled_garbage_collection(ErlNifEnv *env, int argc, const E // trace(TraceTag, TracerState, Tracee, TraceTerm, Opts) static ERL_NIF_TERM trace(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) { - // IMY-todo 参数打印 // enif_fprintf(stdout, "IMY************trace:"); // for (int i = 0; i <= argc - 1; i++) { // if (i != 1) { diff --git a/src/messages/tpMsgSD.erl b/src/messages/tpMsgSD.erl index 1a7d263..45a97bf 100644 --- a/src/messages/tpMsgSD.erl +++ b/src/messages/tpMsgSD.erl @@ -118,22 +118,22 @@ formatEvent({Type, From, _, {'$gen_call', {From, Ref}, Msg}, To}, State) -> NumCalls = get(num_calls) + 1, put(num_calls, NumCalls), put(Ref, NumCalls), - eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"gen:call #~w ~9999P\"];~n">>, [From, label(From, State), case Type of send -> - "->"; _ -> "-->" end, To, label(To, State), NumCalls, Msg, 8]); + eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"gen:call #~w ~9999P\"];~n">>, [From, label(From, State), + case Type of send -> "->"; _ -> "-->" end, To, label(To, State), NumCalls, Msg, 8]); formatEvent(Event = {Type, From, _, {Ref, Msg}, To}, State) -> case get(Ref) of undefined -> defFormatEvent(Event, State); NumCall -> - eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"#~w ~9999P\"];~n">>, [From, label(From, State), case Type of send -> - "->"; _ -> "-->" end, To, label(To, State), NumCall, Msg, 8]) + eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"#~w ~9999P\"];~n">>, [From, label(From, State), + case Type of send -> "->"; _ -> "-->" end, To, label(To, State), NumCall, Msg, 8]) end; formatEvent(Event, State) -> defFormatEvent(Event, State). defFormatEvent({Type, From, _, Msg, To}, State) -> - eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"~9999P\"];~n">>, [From, label(From, State), case Type of send -> - "->"; _ -> "-->" end, To, label(To, State), Msg, 8]). + eFmt:formatBin(<<" \"~w~s\" ~s \"~w~s\" [label=\"~9999P\"];~n">>, [From, label(From, State), + case Type of send -> "->"; _ -> "-->" end, To, label(To, State), Msg, 8]). label(P, #state{meta = Meta}) -> case maps:get(P, Meta, #{}) of