Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(736)

Delta Between Two Patch Sets: src/pkg/runtime/pprof/pprof.go

Issue 12429045: code review 12429045: runtime/pprof: test multithreaded profile, remove OS X ... (Closed)
Left Patch Set: diff -r 8aeade4c393e https://code.google.com/p/go/ Created 11 years, 7 months ago
Right Patch Set: diff -r 1bac09ef43f0 https://code.google.com/p/go/ Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/os_windows.c ('k') | src/pkg/runtime/pprof/pprof_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package pprof writes runtime profiling data in the format expected 5 // Package pprof writes runtime profiling data in the format expected
6 // by the pprof visualization tool. 6 // by the pprof visualization tool.
7 // For more information about pprof, see 7 // For more information about pprof, see
8 // http://code.google.com/p/google-perftools/. 8 // http://code.google.com/p/google-perftools/.
9 package pprof 9 package pprof
10 10
11 import ( 11 import (
12 "bufio" 12 "bufio"
13 "bytes" 13 "bytes"
14 "fmt" 14 "fmt"
15 "io" 15 "io"
16 "runtime" 16 "runtime"
17 "sort" 17 "sort"
18 "strings" 18 "strings"
19 "sync" 19 "sync"
20 "text/tabwriter" 20 "text/tabwriter"
21 ) 21 )
22 22
23 // BUG(rsc): A bug in the OS X Snow Leopard 64-bit kernel prevents 23 // BUG(rsc): Profiles are incomplete and inaccuate on OS X. See http://golang.or g/issue/6047 for details.
24 // CPU profiling from giving accurate results on that system.
25 24
26 // A Profile is a collection of stack traces showing the call sequences 25 // A Profile is a collection of stack traces showing the call sequences
27 // that led to instances of a particular event, such as allocation. 26 // that led to instances of a particular event, such as allocation.
28 // Packages can create and maintain their own profiles; the most common 27 // Packages can create and maintain their own profiles; the most common
29 // use is for tracking resources that must be explicitly closed, such as files 28 // use is for tracking resources that must be explicitly closed, such as files
30 // or network connections. 29 // or network connections.
31 // 30 //
32 // A Profile's methods can be called from multiple goroutines simultaneously. 31 // A Profile's methods can be called from multiple goroutines simultaneously.
33 // 32 //
34 // Each Profile has a unique name. A few profiles are predefined: 33 // Each Profile has a unique name. A few profiles are predefined:
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 } 669 }
671 } 670 }
672 671
673 if tw != nil { 672 if tw != nil {
674 tw.Flush() 673 tw.Flush()
675 } 674 }
676 return b.Flush() 675 return b.Flush()
677 } 676 }
678 677
679 func runtime_cyclesPerSecond() int64 678 func runtime_cyclesPerSecond() int64
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b