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

Side by Side Diff: src/log.cc

Issue 2810019: [Isolates] Move Profiler::paused_ into non-static members. (Closed)
Patch Set: Reflect last review comment. Created 10 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 *sample = buffer_[tail_]; 102 *sample = buffer_[tail_];
103 bool result = overflow_; 103 bool result = overflow_;
104 tail_ = Succ(tail_); 104 tail_ = Succ(tail_);
105 overflow_ = false; 105 overflow_ = false;
106 return result; 106 return result;
107 } 107 }
108 108
109 void Run(); 109 void Run();
110 110
111 // Pause and Resume TickSample data collection. 111 // Pause and Resume TickSample data collection.
112 bool paused() { return paused_; } 112 bool paused() const { return paused_; }
113 void pause() { paused_ = true; } 113 void pause() { paused_ = true; }
114 void resume() { paused_ = false; } 114 void resume() { paused_ = false; }
115 115
116 private: 116 private:
117 // Returns the next index in the cyclic buffer. 117 // Returns the next index in the cyclic buffer.
118 int Succ(int index) { return (index + 1) % kBufferSize; } 118 int Succ(int index) { return (index + 1) % kBufferSize; }
119 119
120 // Cyclic buffer for communicating profiling samples 120 // Cyclic buffer for communicating profiling samples
121 // between the signal handler and the worker thread. 121 // between the signal handler and the worker thread.
122 static const int kBufferSize = 128; 122 static const int kBufferSize = 128;
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 } 1552 }
1553 // Otherwise, if the sliding state window computation has not been 1553 // Otherwise, if the sliding state window computation has not been
1554 // started we do it now. 1554 // started we do it now.
1555 if (sliding_state_window_ == NULL) { 1555 if (sliding_state_window_ == NULL) {
1556 sliding_state_window_ = new SlidingStateWindow(); 1556 sliding_state_window_ = new SlidingStateWindow();
1557 } 1557 }
1558 #endif 1558 #endif
1559 } 1559 }
1560 1560
1561 } } // namespace v8::internal 1561 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698