Quellcode durchsuchen

Add a comment on why 'noinlines' is forced for disasm reports. (#422)

Alexey Alexandrov vor 6 Jahren
Ursprung
Commit
f36417847b
Es ist kein Benutzerkonto mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5
    0
      internal/driver/driver.go

+ 5
- 0
internal/driver/driver.go Datei anzeigen

@@ -166,6 +166,11 @@ func applyCommandOverrides(cmd string, outputFormat int, v variables) variables
166 166
 	case "disasm", "weblist":
167 167
 		trim = false
168 168
 		v.set("addresses", "t")
169
+		// Force the 'noinlines' mode so that source locations for a given address
170
+		// collapse and there is only one for the given address. Without this
171
+		// cumulative metrics would be double-counted when annotating the assembly.
172
+		// This is because the merge is done by address and in case of an inlined
173
+		// stack each of the inlined entries is a separate callgraph node.
169 174
 		v.set("noinlines", "t")
170 175
 	case "peek":
171 176
 		trim = false