Browse Source

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

Alexey Alexandrov 6 years ago
parent
commit
f36417847b
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      internal/driver/driver.go

+ 5
- 0
internal/driver/driver.go View File

166
 	case "disasm", "weblist":
166
 	case "disasm", "weblist":
167
 		trim = false
167
 		trim = false
168
 		v.set("addresses", "t")
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
 		v.set("noinlines", "t")
174
 		v.set("noinlines", "t")
170
 	case "peek":
175
 	case "peek":
171
 		trim = false
176
 		trim = false