 Chromium Code Reviews
 Chromium Code Reviews Issue 10706002:
  Implements a new API to set a function entry hook for profiling.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 10706002:
  Implements a new API to set a function entry hook for profiling.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| OLD | NEW | 
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 // Report process out of memory. Implementation found in api.cc. | 92 // Report process out of memory. Implementation found in api.cc. | 
| 93 static void FatalProcessOutOfMemory(const char* location, | 93 static void FatalProcessOutOfMemory(const char* location, | 
| 94 bool take_snapshot = false); | 94 bool take_snapshot = false); | 
| 95 | 95 | 
| 96 // Allows an entropy source to be provided for use in random number | 96 // Allows an entropy source to be provided for use in random number | 
| 97 // generation. | 97 // generation. | 
| 98 static void SetEntropySource(EntropySource source); | 98 static void SetEntropySource(EntropySource source); | 
| 99 // Support for return-address rewriting profilers. | 99 // Support for return-address rewriting profilers. | 
| 100 static void SetReturnAddressLocationResolver( | 100 static void SetReturnAddressLocationResolver( | 
| 101 ReturnAddressLocationResolver resolver); | 101 ReturnAddressLocationResolver resolver); | 
| 102 // Support for a function entry profiling hook. | |
| 103 static bool SetFunctionEntryHook(FunctionEntryHook entry_hook); | |
| 104 // Returns the location of the function entry profiling hook. | |
| 105 static const FunctionEntryHook* GetFunctionEntryHookLocation(); | |
| 106 // Returns a function that dispatches to the entry profiling hook. | |
| 107 static FunctionEntryHook GetFunctionEntryHookDispatcher(); | |
| 
danno
2012/07/10 09:37:13
Why does the dispatch need to be exposed in the AP
 
Sigurður Ásgeirsson
2012/07/11 14:50:34
This is src/v8.h, in namespace internal::V8, which
 | |
| 102 // Random number generation support. Not cryptographically safe. | 108 // Random number generation support. Not cryptographically safe. | 
| 103 static uint32_t Random(Context* context); | 109 static uint32_t Random(Context* context); | 
| 104 // We use random numbers internally in memory allocation and in the | 110 // We use random numbers internally in memory allocation and in the | 
| 105 // compilers for security. In order to prevent information leaks we | 111 // compilers for security. In order to prevent information leaks we | 
| 106 // use a separate random state for internal random number | 112 // use a separate random state for internal random number | 
| 107 // generation. | 113 // generation. | 
| 108 static uint32_t RandomPrivate(Isolate* isolate); | 114 static uint32_t RandomPrivate(Isolate* isolate); | 
| 109 static Object* FillHeapNumberWithRandom(Object* heap_number, | 115 static Object* FillHeapNumberWithRandom(Object* heap_number, | 
| 110 Context* context); | 116 Context* context); | 
| 111 | 117 | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 | 149 | 
| 144 // JavaScript defines two kinds of equality. | 150 // JavaScript defines two kinds of equality. | 
| 145 enum EqualityKind { kStrictEquality, kNonStrictEquality }; | 151 enum EqualityKind { kStrictEquality, kNonStrictEquality }; | 
| 146 | 152 | 
| 147 | 153 | 
| 148 } } // namespace v8::internal | 154 } } // namespace v8::internal | 
| 149 | 155 | 
| 150 namespace i = v8::internal; | 156 namespace i = v8::internal; | 
| 151 | 157 | 
| 152 #endif // V8_V8_H_ | 158 #endif // V8_V8_H_ | 
| OLD | NEW |