Reviewers: danno,
Message:
hello. Danno.
PTAL.
thanks.
Description:
Fix the paged space statistics report error under debug mode.
If the code event handler is set (enable vtune jit or gdb jit). GC will be
triggered
in Logger::LogCodeObjects during Isolate initializaiton. But the
property_cell_space_used_
definition in snapshot is 0. This leads to the /0 error if "--heap_stats"
flag
is enabled.
BUG=
Please review this at https://codereview.chromium.org/725453002/
Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Affected files (+2, -1 lines):
M src/heap/spaces.cc
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index
2b696ea8eb5238f91f5ade5702cc663f4c09cc73..aa244ad94a1f86d27a148e6a8c484173b31af9da
100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2791,7 +2791,8 @@ void PagedSpace::CollectCodeStatistics() {
void PagedSpace::ReportStatistics() {
- int pct = static_cast<int>(Available() * 100 / Capacity());
+ int pct = Capacity() > 0 ? static_cast<int>(Available() * 100 /
Capacity())
+ : 0;
PrintF(" capacity: %" V8_PTR_PREFIX
"d"
", waste: %" V8_PTR_PREFIX
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.