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

Side by Side Diff: include/v8.h

Issue 10837021: add ETW for V8 symbols
Patch Set: Created 8 years, 4 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 | src/api.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 * Interface for iterating though all external resources in the heap. 2948 * Interface for iterating though all external resources in the heap.
2949 */ 2949 */
2950 class V8EXPORT ExternalResourceVisitor { // NOLINT 2950 class V8EXPORT ExternalResourceVisitor { // NOLINT
2951 public: 2951 public:
2952 virtual ~ExternalResourceVisitor() {} 2952 virtual ~ExternalResourceVisitor() {}
2953 virtual void VisitExternalString(Handle<String> string) {} 2953 virtual void VisitExternalString(Handle<String> string) {}
2954 }; 2954 };
2955 2955
2956 2956
2957 /** 2957 /**
2958 * CodeAddressEvent is used as a callback function for external logging
2959 * of symbols to address.
2960 */
2961 enum CodeAddressOperation {
2962 Add = 1,
2963 Move,
2964 Remove,
2965 Reset,
2966 Source
2967 };
2968
2969 typedef bool (*CodeAddressEvent)(CodeAddressOperation operation,
2970 const void* addr1,
2971 int len,
2972 const char* symbol,
2973 int tag,
2974 const void* addr2,
2975 int line);
2976
2977
2978 /**
2958 * Container class for static utility functions. 2979 * Container class for static utility functions.
2959 */ 2980 */
2960 class V8EXPORT V8 { 2981 class V8EXPORT V8 {
2961 public: 2982 public:
2962 /** Set the callback to invoke in case of fatal errors. */ 2983 /** Set the callback to invoke in case of fatal errors. */
2963 static void SetFatalErrorHandler(FatalErrorCallback that); 2984 static void SetFatalErrorHandler(FatalErrorCallback that);
2964 2985
2965 /** 2986 /**
2966 * Set the callback to invoke to check if code generation from 2987 * Set the callback to invoke to check if code generation from
2967 * strings should be allowed. 2988 * strings should be allowed.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
3359 static void LowMemoryNotification(); 3380 static void LowMemoryNotification();
3360 3381
3361 /** 3382 /**
3362 * Optional notification that a context has been disposed. V8 uses 3383 * Optional notification that a context has been disposed. V8 uses
3363 * these notifications to guide the GC heuristic. Returns the number 3384 * these notifications to guide the GC heuristic. Returns the number
3364 * of context disposals - including this one - since the last time 3385 * of context disposals - including this one - since the last time
3365 * V8 had a chance to clean up. 3386 * V8 had a chance to clean up.
3366 */ 3387 */
3367 static int ContextDisposedNotification(); 3388 static int ContextDisposedNotification();
3368 3389
3390 /**
3391 * This function sets or removes callback to get code address locations.
3392 * Set enumExisting flag to true to enumerate existing code addresses.
3393 */
3394 static void SetCodeAddressEventCallback(CodeAddressEvent callback,
3395 bool enumExisting);
3396
3369 private: 3397 private:
3370 V8(); 3398 V8();
3371 3399
3372 static internal::Object** GlobalizeReference(internal::Object** handle); 3400 static internal::Object** GlobalizeReference(internal::Object** handle);
3373 static void DisposeGlobal(internal::Object** global_handle); 3401 static void DisposeGlobal(internal::Object** global_handle);
3374 static void MakeWeak(internal::Object** global_handle, 3402 static void MakeWeak(internal::Object** global_handle,
3375 void* data, 3403 void* data,
3376 WeakReferenceCallback); 3404 WeakReferenceCallback);
3377 static void ClearWeak(internal::Object** global_handle); 3405 static void ClearWeak(internal::Object** global_handle);
3378 static void MarkIndependent(internal::Object** global_handle); 3406 static void MarkIndependent(internal::Object** global_handle);
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4536 4564
4537 4565
4538 } // namespace v8 4566 } // namespace v8
4539 4567
4540 4568
4541 #undef V8EXPORT 4569 #undef V8EXPORT
4542 #undef TYPE_CHECK 4570 #undef TYPE_CHECK
4543 4571
4544 4572
4545 #endif // V8_H_ 4573 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698