Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: src/platform-win32.cc

Issue 9117032: Reduce the space used by the stack for the profiling thread. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform-win32.cc
===================================================================
--- src/platform-win32.cc (revision 10489)
+++ src/platform-win32.cc (working copy)
@@ -1526,19 +1526,12 @@
// handle until it is started.
Thread::Thread(const Options& options)
- : stack_size_(options.stack_size) {
+ : stack_size_(options.stack_size()) {
data_ = new PlatformData(kNoThread);
- set_name(options.name);
+ set_name(options.name());
}
-Thread::Thread(const char* name)
- : stack_size_(0) {
- data_ = new PlatformData(kNoThread);
- set_name(name);
-}
-
-
void Thread::set_name(const char* name) {
OS::StrNCpy(Vector<char>(name_, sizeof(name_)), name, strlen(name));
name_[sizeof(name_) - 1] = '\0';
@@ -1901,8 +1894,10 @@
class SamplerThread : public Thread {
public:
+ static const int kSamplerThreadStackSize = 32 * KB;
+
explicit SamplerThread(int interval)
- : Thread("SamplerThread"),
+ : Thread(Thread::Options("SamplerThread", kSamplerThreadStackSize)),
interval_(interval) {}
static void AddActiveSampler(Sampler* sampler) {

Powered by Google App Engine
This is Rietveld 408576698