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

Side by Side Diff: src/heap/gc-tracer.h

Issue 1148953009: Fix overflow in allocation throughput calculation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/heap/gc-tracer.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_GC_TRACER_H_ 5 #ifndef V8_HEAP_GC_TRACER_H_
6 #define V8_HEAP_GC_TRACER_H_ 6 #define V8_HEAP_GC_TRACER_H_
7 7
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // Compute the average incremental mark-sweep finalize speed in 380 // Compute the average incremental mark-sweep finalize speed in
381 // bytes/millisecond. 381 // bytes/millisecond.
382 // Returns 0 if no events have been recorded. 382 // Returns 0 if no events have been recorded.
383 intptr_t FinalIncrementalMarkCompactSpeedInBytesPerMillisecond() const; 383 intptr_t FinalIncrementalMarkCompactSpeedInBytesPerMillisecond() const;
384 384
385 // Allocation throughput in the new space in bytes/millisecond. 385 // Allocation throughput in the new space in bytes/millisecond.
386 // Returns 0 if no allocation events have been recorded. 386 // Returns 0 if no allocation events have been recorded.
387 size_t NewSpaceAllocationThroughputInBytesPerMillisecond() const; 387 size_t NewSpaceAllocationThroughputInBytesPerMillisecond() const;
388 388
389 // Bytes allocated in heap in the specified time. 389 // Allocation throughput in heap in bytes/millisecond in the last time_ms
390 // milliseconds.
390 // Returns 0 if no allocation events have been recorded. 391 // Returns 0 if no allocation events have been recorded.
391 size_t AllocatedBytesInLast(double time_ms) const; 392 size_t AllocationThroughputInBytesPerMillisecond(double time_ms) const;
392 393
393 // Allocation throughput in heap in bytes/milliseconds in 394 // Allocation throughput in heap in bytes/milliseconds in
394 // the last five seconds. 395 // the last five seconds.
395 // Returns 0 if no allocation events have been recorded. 396 // Returns 0 if no allocation events have been recorded.
396 size_t CurrentAllocationThroughputInBytesPerMillisecond() const; 397 size_t CurrentAllocationThroughputInBytesPerMillisecond() const;
397 398
398 // Computes the context disposal rate in milliseconds. It takes the time 399 // Computes the context disposal rate in milliseconds. It takes the time
399 // frame of the first recorded context disposal to the current time and 400 // frame of the first recorded context disposal to the current time and
400 // divides it by the number of recorded events. 401 // divides it by the number of recorded events.
401 // Returns 0 if no events have been recorded. 402 // Returns 0 if no events have been recorded.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 512
512 // Counts how many tracers were started without stopping. 513 // Counts how many tracers were started without stopping.
513 int start_counter_; 514 int start_counter_;
514 515
515 DISALLOW_COPY_AND_ASSIGN(GCTracer); 516 DISALLOW_COPY_AND_ASSIGN(GCTracer);
516 }; 517 };
517 } 518 }
518 } // namespace v8::internal 519 } // namespace v8::internal
519 520
520 #endif // V8_HEAP_GC_TRACER_H_ 521 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698