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

Side by Side Diff: src/counters.h

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static bool HasCounterFunction() { 58 static bool HasCounterFunction() {
59 return lookup_function_ != NULL; 59 return lookup_function_ != NULL;
60 } 60 }
61 61
62 // Lookup the location of a counter by name. If the lookup 62 // Lookup the location of a counter by name. If the lookup
63 // is successful, returns a non-NULL pointer for writing the 63 // is successful, returns a non-NULL pointer for writing the
64 // value of the counter. Each thread calling this function 64 // value of the counter. Each thread calling this function
65 // may receive a different location to store it's counter. 65 // may receive a different location to store it's counter.
66 // The return value must not be cached and re-used across 66 // The return value must not be cached and re-used across
67 // threads, although a single thread is free to cache it. 67 // threads, although a single thread is free to cache it.
68 static int *FindLocation(const char* name) { 68 static int* FindLocation(const char* name) {
69 if (!lookup_function_) return NULL; 69 if (!lookup_function_) return NULL;
70 return lookup_function_(name); 70 return lookup_function_(name);
71 } 71 }
72 72
73 // Create a histogram by name. If the create is successful, 73 // Create a histogram by name. If the create is successful,
74 // returns a non-NULL pointer for use with AddHistogramSample 74 // returns a non-NULL pointer for use with AddHistogramSample
75 // function. min and max define the expected minimum and maximum 75 // function. min and max define the expected minimum and maximum
76 // sample values. buckets is the maximum number of buckets 76 // sample values. buckets is the maximum number of buckets
77 // that the samples will be grouped into. 77 // that the samples will be grouped into.
78 static void* CreateHistogram(const char* name, 78 static void* CreateHistogram(const char* name,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 timer_->Stop(); 230 timer_->Stop();
231 } 231 }
232 private: 232 private:
233 HistogramTimer* timer_; 233 HistogramTimer* timer_;
234 }; 234 };
235 235
236 236
237 } } // namespace v8::internal 237 } } // namespace v8::internal
238 238
239 #endif // V8_COUNTERS_H_ 239 #endif // V8_COUNTERS_H_
OLDNEW
« no previous file with comments | « src/conversions-inl.h ('k') | src/cpu-profiler.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698