Skip to content

Commit 6cc45ae

Browse files
committed
dyninst: log more info about SymDB uploads
1 parent 0a5c247 commit 6cc45ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/dyninst/module/symdb.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ func (m *symdbManager) performUpload(
575575

576576
log.Infof("SymDB: uploading symbols for process %v (service: %s, version: %s, executable: %s)",
577577
procID.pid, procID.service, procID.version, executablePath)
578+
startTime := time.Now()
578579
it, err := symdb.PackagesIterator(
579580
executablePath,
580581
m.objectLoader,
@@ -592,6 +593,7 @@ func (m *symdbManager) performUpload(
592593
bufferFuncs := 0
593594
uploadID := uuid.New()
594595
batchNum := 0
596+
var totalPackages, totalFuncs int
595597
// Flush every so often in order to not store too many scopes in memory.
596598
maybeFlush := func(final bool) error {
597599
if ctx.Err() != nil {
@@ -632,13 +634,18 @@ func (m *symdbManager) performUpload(
632634

633635
scope := uploader.ConvertPackageToScope(pkg.Package, version.AgentVersion)
634636
uploadBuffer = append(uploadBuffer, scope)
637+
totalPackages++
638+
totalFuncs += pkg.Stats().NumFunctions
635639
bufferFuncs += pkg.Stats().NumFunctions
636640
if err := maybeFlush(pkg.Final); err != nil {
637641
return err
638642
}
639643
}
640644

641-
log.Infof("SymDB: Successfully uploaded symbols for process %v (service: %s, version: %s, executable: %s)",
642-
procID.pid, procID.service, procID.version, executablePath)
645+
log.Infof("SymDB: Successfully uploaded symbols for process %v "+
646+
"(service: %s, version: %s, executable: %s):"+
647+
" %d packages, %d functions, %d chunks in %v",
648+
procID.pid, procID.service, procID.version, executablePath,
649+
totalPackages, totalFuncs, batchNum, time.Since(startTime))
643650
return nil
644651
}

0 commit comments

Comments
 (0)