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

Unified Diff: src/pkg/runtime/lock_sema.c

Issue 12429045: code review 12429045: runtime/pprof: test multithreaded profile, remove OS X ... (Closed)
Patch Set: diff -r 1bac09ef43f0 https://code.google.com/p/go/ Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/lock_futex.c ('k') | src/pkg/runtime/os_darwin.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/lock_sema.c
===================================================================
--- a/src/pkg/runtime/lock_sema.c
+++ b/src/pkg/runtime/lock_sema.c
@@ -81,11 +81,7 @@
}
if(v&LOCKED) {
// Queued. Wait.
- if(m->profilehz > 0)
- runtime·setprof(false);
runtime·semasleep(-1);
- if(m->profilehz > 0)
- runtime·setprof(true);
i = 0;
}
}
@@ -164,11 +160,7 @@
return;
}
// Queued. Sleep.
- if(m->profilehz > 0)
- runtime·setprof(false);
runtime·semasleep(-1);
- if(m->profilehz > 0)
- runtime·setprof(true);
}
#pragma textflag 7
@@ -240,16 +232,11 @@
if(m->waitsema == 0)
m->waitsema = runtime·semacreate();
- if(m->profilehz > 0)
- runtime·setprof(false);
res = notetsleep(n, ns, 0, nil);
- if(m->profilehz > 0)
- runtime·setprof(true);
return res;
}
// same as runtime·notetsleep, but called on user g (not g0)
-// does not need to call runtime·setprof, because entersyscallblock does it
// calls only nosplit functions between entersyscallblock/exitsyscall
bool
runtime·notetsleepg(Note *n, int64 ns)
« no previous file with comments | « src/pkg/runtime/lock_futex.c ('k') | src/pkg/runtime/os_darwin.c » ('j') | no next file with comments »

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