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

Side by Side Diff: include/v8.h

Issue 5687003: New heap profiler: add support for progress reporting and control. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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
« no previous file with comments | « no previous file | include/v8-profiler.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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 3263 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 virtual OutputEncoding GetOutputEncoding() { return kAscii; } 3274 virtual OutputEncoding GetOutputEncoding() { return kAscii; }
3275 /** 3275 /**
3276 * Writes the next chunk of snapshot data into the stream. Writing 3276 * Writes the next chunk of snapshot data into the stream. Writing
3277 * can be stopped by returning kAbort as function result. EndOfStream 3277 * can be stopped by returning kAbort as function result. EndOfStream
3278 * will not be called in case writing was aborted. 3278 * will not be called in case writing was aborted.
3279 */ 3279 */
3280 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; 3280 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0;
3281 }; 3281 };
3282 3282
3283 3283
3284 /**
3285 * An interface for reporting progress and controlling long-running
3286 * activities.
3287 */
3288 class V8EXPORT ActivityControl { // NOLINT
3289 public:
3290 enum ControlOption {
3291 kContinue = 0,
3292 kAbort = 1
3293 };
3294 virtual ~ActivityControl() {}
3295 /**
3296 * Notify about current progress. The activity can be stopped by
3297 * returning kAbort as the callback result.
3298 */
3299 virtual ControlOption ReportProgressValue(int done, int total) = 0;
3300 };
3301
3284 3302
3285 // --- I m p l e m e n t a t i o n --- 3303 // --- I m p l e m e n t a t i o n ---
3286 3304
3287 3305
3288 namespace internal { 3306 namespace internal {
3289 3307
3290 static const int kApiPointerSize = sizeof(void*); // NOLINT 3308 static const int kApiPointerSize = sizeof(void*); // NOLINT
3291 static const int kApiIntSize = sizeof(int); // NOLINT 3309 static const int kApiIntSize = sizeof(int); // NOLINT
3292 3310
3293 // Tag information for HeapObject. 3311 // Tag information for HeapObject.
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3744 3762
3745 3763
3746 } // namespace v8 3764 } // namespace v8
3747 3765
3748 3766
3749 #undef V8EXPORT 3767 #undef V8EXPORT
3750 #undef TYPE_CHECK 3768 #undef TYPE_CHECK
3751 3769
3752 3770
3753 #endif // V8_H_ 3771 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698