|
@@ -54,8 +54,6 @@ func Generate(w io.Writer, rpt *Report, obj plugin.ObjTool) error {
|
54
|
54
|
return printTags(w, rpt)
|
55
|
55
|
case Proto:
|
56
|
56
|
return rpt.prof.Write(w)
|
57
|
|
- case TrimProto:
|
58
|
|
- return printTrimmedProto(w, rpt)
|
59
|
57
|
case TopProto:
|
60
|
58
|
return printTopProto(w, rpt)
|
61
|
59
|
case Dis:
|
|
@@ -197,10 +195,7 @@ func (rpt *Report) newGraph(nodes graph.NodeSet) *graph.Graph {
|
197
|
195
|
}
|
198
|
196
|
s.NumLabel = numLabels
|
199
|
197
|
}
|
200
|
|
- return graph.New(rpt.prof, graphOptions(o, nodes))
|
201
|
|
-}
|
202
|
198
|
|
203
|
|
-func graphOptions(o *Options, nodes graph.NodeSet) *graph.Options {
|
204
|
199
|
gopt := &graph.Options{
|
205
|
200
|
SampleValue: o.SampleValue,
|
206
|
201
|
FormatTag: formatTag,
|
|
@@ -216,7 +211,7 @@ func graphOptions(o *Options, nodes graph.NodeSet) *graph.Options {
|
216
|
211
|
gopt.ObjNames = true
|
217
|
212
|
}
|
218
|
213
|
|
219
|
|
- return gopt
|
|
214
|
+ return graph.New(rpt.prof, gopt)
|
220
|
215
|
}
|
221
|
216
|
|
222
|
217
|
func formatTag(v int64, key string) string {
|
|
@@ -272,17 +267,6 @@ func printTopProto(w io.Writer, rpt *Report) error {
|
272
|
267
|
return out.Write(w)
|
273
|
268
|
}
|
274
|
269
|
|
275
|
|
-// printTrimmedProto writes a profile in a serialize profile.proto,
|
276
|
|
-// removing symbol information from infrequent nodes to reduce the
|
277
|
|
-// size of the profile.
|
278
|
|
-func printTrimmedProto(w io.Writer, rpt *Report) error {
|
279
|
|
- o := rpt.options
|
280
|
|
- prof := rpt.prof
|
281
|
|
- prof = graph.TrimProfile(prof, graphOptions(o, nil), o.NodeFraction)
|
282
|
|
-
|
283
|
|
- return prof.Write(w)
|
284
|
|
-}
|
285
|
|
-
|
286
|
270
|
// printAssembly prints an annotated assembly listing.
|
287
|
271
|
func printAssembly(w io.Writer, rpt *Report, obj plugin.ObjTool) error {
|
288
|
272
|
o := rpt.options
|
|
@@ -871,7 +855,6 @@ const (
|
871
|
855
|
WebList
|
872
|
856
|
Callgrind
|
873
|
857
|
TopProto
|
874
|
|
- TrimProto
|
875
|
858
|
)
|
876
|
859
|
|
877
|
860
|
// Options are the formatting and filtering options used to generate a
|