Changeset 188475 in webkit for trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h
- Timestamp:
- Aug 14, 2015, 9:53:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h
r188444 r188475 33 33 #include <wtf/FastMalloc.h> 34 34 #include <wtf/HashMap.h> 35 #include <wtf/Lock.h>36 35 #include <wtf/Noncopyable.h> 37 36 #include <wtf/PassRefPtr.h> … … 72 71 73 72 private: 73 // Use a full-blown adaptive mutex because: 74 // - There is only one ProfilerDatabase per VM. The size overhead of the system's 75 // mutex is negligible if you only have one of them. 76 // - It's locked infrequently - once per bytecode generation, compilation, and 77 // code block collection - so the fact that the fast path still requires a 78 // function call is neglible. 79 // - It tends to be held for a while. Currently, we hold it while generating 80 // Profiler::Bytecodes for a CodeBlock. That's uncommon and shouldn't affect 81 // performance, but if we did have contention, we would want a sensible, 82 // power-aware backoff. An adaptive mutex will do this as a matter of course, 83 // but a spinlock won't. 84 typedef Mutex Lock; 85 typedef MutexLocker Locker; 86 87 74 88 void addDatabaseToAtExit(); 75 89 void removeDatabaseFromAtExit();
Note:
See TracChangeset
for help on using the changeset viewer.