Przeglądaj źródła

ft: 代码修改

master
SisMaker 3 lat temu
rodzic
commit
8e8db171b7
2 zmienionych plików z 6 dodań i 7 usunięć
  1. +0
    -1
      c_src/tracer/tpTracerNif.c
  2. +6
    -6
      src/messages/tpMsgSD.erl

+ 0
- 1
c_src/tracer/tpTracerNif.c Wyświetl plik

@ -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) {

+ 6
- 6
src/messages/tpMsgSD.erl Wyświetl plik

@ -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

Ładowanie…
Anuluj
Zapisz