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

Delta Between Two Patch Sets: src/pkg/runtime/mprof.goc

Issue 5279048: code review 5279048: runtime: faster and more scalable GC (Closed)
Left Patch Set: diff -r 60d08510dc91 https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Right Patch Set: diff -r f44057cc01b2 https://go.googlecode.com/hg/ Created 12 years, 11 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/mheap.c ('k') | src/pkg/runtime/proc.c » ('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 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 // Malloc profiling. 5 // Malloc profiling.
6 // Patterned after tcmalloc's algorithms; shorter code. 6 // Patterned after tcmalloc's algorithms; shorter code.
7 7
8 package runtime 8 package runtime
9 #include "runtime.h" 9 #include "runtime.h"
10 #include "arch_GOARCH.h" 10 #include "arch_GOARCH.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 if(all) 348 if(all)
349 runtime·tracebackothers(g); 349 runtime·tracebackothers(g);
350 n = b.len - g->writenbuf; 350 n = b.len - g->writenbuf;
351 g->writebuf = nil; 351 g->writebuf = nil;
352 g->writenbuf = 0; 352 g->writenbuf = 0;
353 } 353 }
354 ········ 354 ········
355 if(all) { 355 if(all) {
356 m->gcing = 0; 356 m->gcing = 0;
357 runtime·semrelease(&runtime·worldsema); 357 runtime·semrelease(&runtime·worldsema);
358 » » runtime·starttheworld(false); 358 » » runtime·starttheworld();
359 } 359 }
360 } 360 }
361 361
362 static void 362 static void
363 saveg(byte *pc, byte *sp, G *g, TRecord *r) 363 saveg(byte *pc, byte *sp, G *g, TRecord *r)
364 { 364 {
365 int32 n; 365 int32 n;
366 ········ 366 ········
367 n = runtime·gentraceback(pc, sp, 0, g, 0, r->stk, nelem(r->stk)); 367 n = runtime·gentraceback(pc, sp, 0, g, 0, r->stk, nelem(r->stk));
368 if(n < nelem(r->stk)) 368 if(n < nelem(r->stk))
(...skipping 22 matching lines...) Expand all
391 saveg(pc, sp, g, r++); 391 saveg(pc, sp, g, r++);
392 for(gp = runtime·allg; gp != nil; gp = gp->alllink) { 392 for(gp = runtime·allg; gp != nil; gp = gp->alllink) {
393 if(gp == g || gp->status == Gdead) 393 if(gp == g || gp->status == Gdead)
394 continue; 394 continue;
395 saveg(gp->sched.pc, gp->sched.sp, gp, r++); 395 saveg(gp->sched.pc, gp->sched.sp, gp, r++);
396 } 396 }
397 } 397 }
398 ········ 398 ········
399 m->gcing = 0; 399 m->gcing = 0;
400 runtime·semrelease(&runtime·worldsema); 400 runtime·semrelease(&runtime·worldsema);
401 » » runtime·starttheworld(false); 401 » » runtime·starttheworld();
402 » } 402 » }
403 } 403 }
404 404
LEFTRIGHT

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