Reviewers: Mads Ager,

Message:
kRSetOffset is 0 on all platforms except X64.

Description:
Fix --heap-stats option on X64

Please review this at http://codereview.chromium.org/210020

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/spaces.cc


Index: src/spaces.cc
===================================================================
--- src/spaces.cc       (revision 2932)
+++ src/spaces.cc       (working copy)
@@ -1906,7 +1906,7 @@
        int rset = Memory::int_at(rset_addr);
        if (rset != 0) {
          // Bits were set
-        int intoff = rset_addr - p->address();
+        int intoff = rset_addr - p->address() - Page::kRSetOffset;
          int bitoff = 0;
          for (; bitoff < kBitsPerInt; ++bitoff) {
            if ((rset & (1 << bitoff)) != 0) {
@@ -2171,7 +2171,7 @@
        int rset = Memory::int_at(rset_addr);
        if (rset != 0) {
          // Bits were set
-        int intoff = rset_addr - p->address();
+        int intoff = rset_addr - p->address() - Page::kRSetOffset;
          int bitoff = 0;
          for (; bitoff < kBitsPerInt; ++bitoff) {
            if ((rset & (1 << bitoff)) != 0) {



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to