LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 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 // Garbage collector (GC). | 5 // Garbage collector (GC). |
6 // | 6 // |
7 // GC is: | 7 // GC is: |
8 // - mark&sweep | 8 // - mark&sweep |
9 // - mostly precise (with the exception of some C-allocated objects, assembly fr
ames/arguments, etc) | 9 // - mostly precise (with the exception of some C-allocated objects, assembly fr
ames/arguments, etc) |
10 // - parallel (up to MaxGcproc threads) | 10 // - parallel (up to MaxGcproc threads) |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 break; | 706 break; |
707 } | 707 } |
708 | 708 |
709 if(gp == g) | 709 if(gp == g) |
710 runtime·throw("can't scan our own stack"); | 710 runtime·throw("can't scan our own stack"); |
711 if((mp = gp->m) != nil && mp->helpgc) | 711 if((mp = gp->m) != nil && mp->helpgc) |
712 runtime·throw("can't scan gchelper stack"); | 712 runtime·throw("can't scan gchelper stack"); |
713 | 713 |
714 fn = scanframe; | 714 fn = scanframe; |
715 runtime·gentraceback(~(uintptr)0, ~(uintptr)0, 0, gp, 0, nil, 0x7fffffff
, &fn, nil, false); | 715 runtime·gentraceback(~(uintptr)0, ~(uintptr)0, 0, gp, 0, nil, 0x7fffffff
, &fn, nil, false); |
| 716 runtime·tracebackdefers(gp, &fn, nil); |
716 } | 717 } |
717 | 718 |
718 // The gp has been moved to a gc safepoint. If there is gcphase specific | 719 // The gp has been moved to a gc safepoint. If there is gcphase specific |
719 // work it is done here.· | 720 // work it is done here.· |
720 void | 721 void |
721 runtime·gcphasework(G *gp) | 722 runtime·gcphasework(G *gp) |
722 { | 723 { |
723 switch(runtime·gcphase) { | 724 switch(runtime·gcphase) { |
724 default: | 725 default: |
725 runtime·throw("gcphasework in bad gcphase"); | 726 runtime·throw("gcphasework in bad gcphase"); |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 void runtime·gc_unixnanotime(int64 *now); | 1898 void runtime·gc_unixnanotime(int64 *now); |
1898 | 1899 |
1899 int64 | 1900 int64 |
1900 runtime·unixnanotime(void) | 1901 runtime·unixnanotime(void) |
1901 { | 1902 { |
1902 int64 now; | 1903 int64 now; |
1903 | 1904 |
1904 runtime·gc_unixnanotime(&now); | 1905 runtime·gc_unixnanotime(&now); |
1905 return now; | 1906 return now; |
1906 } | 1907 } |
LEFT | RIGHT |