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/unbound-queue.h

Issue 2438002: CPU profiler: sample call stack on profiling start. (Closed)
Patch Set: 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 | « src/profile-generator.h ('k') | src/unbound-queue-inl.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 29 matching lines...) Expand all
40 // http://www.ddj.com/high-performance-computing/210604448 40 // http://www.ddj.com/high-performance-computing/210604448
41 template<typename Record> 41 template<typename Record>
42 class UnboundQueue BASE_EMBEDDED { 42 class UnboundQueue BASE_EMBEDDED {
43 public: 43 public:
44 inline UnboundQueue(); 44 inline UnboundQueue();
45 inline ~UnboundQueue(); 45 inline ~UnboundQueue();
46 46
47 INLINE(void Dequeue(Record* rec)); 47 INLINE(void Dequeue(Record* rec));
48 INLINE(void Enqueue(const Record& rec)); 48 INLINE(void Enqueue(const Record& rec));
49 INLINE(bool IsEmpty()) { return divider_ == last_; } 49 INLINE(bool IsEmpty()) { return divider_ == last_; }
50 INLINE(Record* Peek());
50 51
51 private: 52 private:
52 INLINE(void DeleteFirst()); 53 INLINE(void DeleteFirst());
53 54
54 struct Node; 55 struct Node;
55 56
56 Node* first_; 57 Node* first_;
57 AtomicWord divider_; // Node* 58 AtomicWord divider_; // Node*
58 AtomicWord last_; // Node* 59 AtomicWord last_; // Node*
59 60
60 DISALLOW_COPY_AND_ASSIGN(UnboundQueue); 61 DISALLOW_COPY_AND_ASSIGN(UnboundQueue);
61 }; 62 };
62 63
63 64
64 } } // namespace v8::internal 65 } } // namespace v8::internal
65 66
66 #endif // V8_UNBOUND_QUEUE_ 67 #endif // V8_UNBOUND_QUEUE_
OLDNEW
« no previous file with comments | « src/profile-generator.h ('k') | src/unbound-queue-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698