Skip to content

Commit 7e3f3b9

Browse files
committed
misc
1 parent b98f985 commit 7e3f3b9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

scouterx/strace/tracemain.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,8 @@ func StartNewInheritanceService(ctx context.Context, parentTctx *netio.TraceCont
223223

224224
func inheritTctx(newTctx *netio.TraceContext, parentTctx *netio.TraceContext) *netio.TraceContext {
225225
newTctx.Inherit = true
226-
newTctx.InheritStartTime = newTctx.StartTime
227-
newTctx.StartTime = parentTctx.StartTime
226+
newTctx.Gxid = parentTctx.Gxid
228227
newTctx.XType = parentTctx.XType
229-
newTctx.Profile = parentTctx.Profile
230-
newTctx.ProfileCount = parentTctx.ProfileCount
231-
newTctx.ProfileSize = parentTctx.ProfileSize
232228
newTctx.Profile.Add(netdata.NewMessageStep("scouter inheritance step", 0))
233229
newTctx.IsStream = parentTctx.IsStream
234230

@@ -320,6 +316,7 @@ func startService(ctx context.Context, serviceName, remoteAddr string) (context.
320316
newCtx, tctx := tctxmanager.NewTraceContext(ctx)
321317
tctxmanager.Start(tctx)
322318

319+
tctx.Gxid = tctx.Txid
323320
tctx.Goid = goid()
324321
tctx.Profile.Add(netdata.NewMessageStep(fmt.Sprintf("goroutine:%d", tctx.Goid), 0))
325322

@@ -364,9 +361,6 @@ func endAnyServiceOfTraceContext(tctx *netio.TraceContext) {
364361
tctxmanager.End(tctx)
365362

366363
elapsed := util.MillisToNow(tctx.StartTime)
367-
if tctx.Inherit {
368-
elapsed = util.MillisToNow(tctx.InheritStartTime)
369-
}
370364
discardType := findXLogDiscard(tctx, elapsed)
371365
xlog := tctx.ToXlog(discardType, elapsed)
372366

0 commit comments

Comments
 (0)