|
@@ -272,7 +272,8 @@ func newMapping(prof *profile.Profile, obj plugin.ObjTool, ui plugin.UI, force b
|
272
|
272
|
mappings[l.Mapping] = true
|
273
|
273
|
}
|
274
|
274
|
|
275
|
|
- for _, m := range prof.Mapping {
|
|
275
|
+ missingBinaries := false
|
|
276
|
+ for mix, m := range prof.Mapping {
|
276
|
277
|
if !mappings[m] {
|
277
|
278
|
continue
|
278
|
279
|
}
|
|
@@ -282,9 +283,19 @@ func newMapping(prof *profile.Profile, obj plugin.ObjTool, ui plugin.UI, force b
|
282
|
283
|
continue
|
283
|
284
|
}
|
284
|
285
|
|
|
286
|
+ if m.File == "" {
|
|
287
|
+ if mix == 0 {
|
|
288
|
+ ui.PrintErr("Main binary filename not available.\n" +
|
|
289
|
+ "Try passing the path to the main binary before the profile.")
|
|
290
|
+ continue
|
|
291
|
+ }
|
|
292
|
+ missingBinaries = true
|
|
293
|
+ continue
|
|
294
|
+ }
|
|
295
|
+
|
285
|
296
|
// Skip well-known system mappings
|
286
|
297
|
name := filepath.Base(m.File)
|
287
|
|
- if m.File == "" || name == "[vdso]" || strings.HasPrefix(name, "linux-vdso") {
|
|
298
|
+ if name == "[vdso]" || strings.HasPrefix(name, "linux-vdso") {
|
288
|
299
|
continue
|
289
|
300
|
}
|
290
|
301
|
|
|
@@ -301,7 +312,9 @@ func newMapping(prof *profile.Profile, obj plugin.ObjTool, ui plugin.UI, force b
|
301
|
312
|
|
302
|
313
|
mt.segments[m] = f
|
303
|
314
|
}
|
304
|
|
-
|
|
315
|
+ if missingBinaries {
|
|
316
|
+ ui.PrintErr("Some binary filenames not available. Symbolization may be incomplete.")
|
|
317
|
+ }
|
305
|
318
|
return mt, nil
|
306
|
319
|
}
|
307
|
320
|
|