Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:scouter-project/scouter into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gunlee01 committed Aug 4, 2016
2 parents 0fc0ef7 + 9c6a2b4 commit cc2c10e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions scouter.agent.java/src/scouter/agent/trace/TraceMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,17 @@ public static Object startMethod(int hash, String classMethod) {
Object localContext = startService(classMethod, null, null, null, null, null, XLogTypes.APP_SERVICE);
//startService내부에서 에러가 나는 경우(발생하면 안됨)
//Null이 리턴될 수 있음(방어코드)
//@skyworker
if (localContext != null && conf._trace_auto_service_backstack_enabled) {
String stack = ThreadUtil.getStackTrace(Thread.currentThread().getStackTrace(), 2);
AutoServiceStartAnalyzer.put(classMethod, stack);
MessageStep m = new MessageStep();
m.message = "SERVICE BACKSTACK:\n" + stack;
((LocalContext) localContext).context.profile.add(m);
//@PaulKen
if (localContext != null) {
//service start
((LocalContext) localContext).service = true;
if (conf._trace_auto_service_backstack_enabled) {
String stack = ThreadUtil.getStackTrace(Thread.currentThread().getStackTrace(), 2);
AutoServiceStartAnalyzer.put(classMethod, stack);
MessageStep m = new MessageStep();
m.message = "SERVICE BACKSTACK:\n" + stack;
((LocalContext) localContext).context.profile.add(m);
}
}
return localContext;
}
Expand All @@ -679,7 +683,7 @@ public static void endMethod(Object localContext, Throwable thr) {
return;
LocalContext lctx = (LocalContext) localContext;
if (lctx.service) {
endService(lctx.option, null, thr);
endService(lctx, null, thr);
return;
}
MethodStep step = (MethodStep) lctx.stepSingle;
Expand Down

0 comments on commit cc2c10e

Please sign in to comment.