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

Side by Side Diff: src/sweeper-thread.h

Issue 68203029: Make number of available threads isolate-dependent and expose it to ResourceConstraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime-profiler.cc ('k') | src/sweeper-thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 explicit SweeperThread(Isolate* isolate); 45 explicit SweeperThread(Isolate* isolate);
46 ~SweeperThread() {} 46 ~SweeperThread() {}
47 47
48 void Run(); 48 void Run();
49 void Stop(); 49 void Stop();
50 void StartSweeping(); 50 void StartSweeping();
51 void WaitForSweeperThread(); 51 void WaitForSweeperThread();
52 intptr_t StealMemory(PagedSpace* space); 52 intptr_t StealMemory(PagedSpace* space);
53 53
54 static int NumberOfThreads(int max_available);
55
54 private: 56 private:
55 Isolate* isolate_; 57 Isolate* isolate_;
56 Heap* heap_; 58 Heap* heap_;
57 MarkCompactCollector* collector_; 59 MarkCompactCollector* collector_;
58 Semaphore start_sweeping_semaphore_; 60 Semaphore start_sweeping_semaphore_;
59 Semaphore end_sweeping_semaphore_; 61 Semaphore end_sweeping_semaphore_;
60 Semaphore stop_semaphore_; 62 Semaphore stop_semaphore_;
61 FreeList free_list_old_data_space_; 63 FreeList free_list_old_data_space_;
62 FreeList free_list_old_pointer_space_; 64 FreeList free_list_old_pointer_space_;
63 FreeList private_free_list_old_data_space_; 65 FreeList private_free_list_old_data_space_;
64 FreeList private_free_list_old_pointer_space_; 66 FreeList private_free_list_old_pointer_space_;
65 volatile AtomicWord stop_thread_; 67 volatile AtomicWord stop_thread_;
66 }; 68 };
67 69
68 } } // namespace v8::internal 70 } } // namespace v8::internal
69 71
70 #endif // V8_SWEEPER_THREAD_H_ 72 #endif // V8_SWEEPER_THREAD_H_
OLDNEW
« no previous file with comments | « src/runtime-profiler.cc ('k') | src/sweeper-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698