Browse Source

ft: 部分优化调整

master
SisMaker 3 years ago
parent
commit
ee5039f18d
3 changed files with 6 additions and 4 deletions
  1. +1
    -1
      rebar.config
  2. +1
    -1
      src/callgrind/tpCallGrind.erl
  3. +4
    -2
      src/eTpf.erl

+ 1
- 1
rebar.config View File

@ -3,7 +3,7 @@
{eFmt, ".*", {git, "http://47.108.26.175:53000/SisMaker/eFmt.git", {branch, "master"}}}, {eFmt, ".*", {git, "http://47.108.26.175:53000/SisMaker/eFmt.git", {branch, "master"}}},
{eSync, ".*", {git, "http://47.108.26.175:53000/SisMaker/eSync.git", {branch, "master"}}}, {eSync, ".*", {git, "http://47.108.26.175:53000/SisMaker/eSync.git", {branch, "master"}}},
{eGbh, ".*", {git, "http://47.108.26.175:53000/SisMaker/eGbh.git", {branch, "master"}}} {eGbh, ".*", {git, "http://47.108.26.175:53000/SisMaker/eGbh.git", {branch, "master"}}}
, {eAcs, ".*", {git, "http://47.108.26.175:53000/SisMaker/eAcs.git", {branch, "master"}}}
]}. ]}.
{shell, [ {shell, [

+ 1
- 1
src/callgrind/tpCallGrind.erl View File

@ -383,7 +383,7 @@ formatSubcalls(LN, [#call{mfa = MFA, source = {Source, TargetLN}, incl = Incl, w
[ [
"cfi=", Source, "\n" "cfi=", Source, "\n"
"cfn=", atom_to_list(MFA), "\n" "cfn=", atom_to_list(MFA), "\n"
"calls=", integer_to_list(Count), " ", integer_to_list(TargetLN), "\n",
"calls=", integer_to_list(Count), " ", integer_to_list(TargetLN), "\n",
integer_to_list(LN), " ", integer_to_list(Incl), RunningCosts, "\n" integer_to_list(LN), " ", integer_to_list(Incl), RunningCosts, "\n"
] | formatSubcalls(LN, Tail, Opts) ] | formatSubcalls(LN, Tail, Opts)
]. ].

+ 4
- 2
src/eTpf.erl View File

@ -49,10 +49,10 @@ sts1() ->
trace([test, {scope, [self()]}]). trace([test, {scope, [self()]}]).
stl() -> stl() ->
trace(self(), [all], [{test, '_', '_'}], tpTracerLog, #{}, #{}).
trace(new_processes, [call, arity, return_to, garbage_collection], [{app, eAcs}], tpTracerLog, #{}, #{stackTc => true}).
stf() -> stf() ->
trace([{app, eSync}, {scope, [whereis(esSyncSrv)]}], tpTracerFile).
trace(new_processes, [call, arity, return_to, garbage_collection], [{app, eAcs}], tpTracerFile, #{}, #{stackTc => true}).
stop() -> stop() ->
stop(?eTpfTracerId). stop(?eTpfTracerId).
@ -69,6 +69,7 @@ ptl() ->
ptf() -> ptf() ->
spawn(eAcs, replaceSw, [<<"fdsfads拉法叶舰fds淫秽ffdsfdsffdddd"/utf8>>]),
ok. ok.
rsPfs(InputFile) -> rsPfs(InputFile) ->
@ -153,6 +154,7 @@ doTrace(PidPortSpec, FlagList, TraceMods, TracerMod, TracerOpts, TraceOpts) ->
begin begin
%% The module must be loaded before we attempt to trace it. %% The module must be loaded before we attempt to trace it.
_ = code:ensure_loaded(M), _ = code:ensure_loaded(M),
io:format("IMY*********************** ~p~n", [M]),
_ = erlang:trace_pattern(OneTraceMFA, MatchSpec, PtFlags) _ = erlang:trace_pattern(OneTraceMFA, MatchSpec, PtFlags)
end || {M, _F, _A} = OneTraceMFA <- TraceMFAs end || {M, _F, _A} = OneTraceMFA <- TraceMFAs
], ],

Loading…
Cancel
Save