Commit 0e63056c authored by whesse@chromium.org's avatar whesse@chromium.org

Fix --heap-stats option on X64

Review URL: http://codereview.chromium.org/210020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4ac11e3b
...@@ -1906,7 +1906,7 @@ void OldSpace::ReportStatistics() { ...@@ -1906,7 +1906,7 @@ void OldSpace::ReportStatistics() {
int rset = Memory::int_at(rset_addr); int rset = Memory::int_at(rset_addr);
if (rset != 0) { if (rset != 0) {
// Bits were set // Bits were set
int intoff = rset_addr - p->address(); int intoff = rset_addr - p->address() - Page::kRSetOffset;
int bitoff = 0; int bitoff = 0;
for (; bitoff < kBitsPerInt; ++bitoff) { for (; bitoff < kBitsPerInt; ++bitoff) {
if ((rset & (1 << bitoff)) != 0) { if ((rset & (1 << bitoff)) != 0) {
...@@ -2171,7 +2171,7 @@ void FixedSpace::ReportStatistics() { ...@@ -2171,7 +2171,7 @@ void FixedSpace::ReportStatistics() {
int rset = Memory::int_at(rset_addr); int rset = Memory::int_at(rset_addr);
if (rset != 0) { if (rset != 0) {
// Bits were set // Bits were set
int intoff = rset_addr - p->address(); int intoff = rset_addr - p->address() - Page::kRSetOffset;
int bitoff = 0; int bitoff = 0;
for (; bitoff < kBitsPerInt; ++bitoff) { for (; bitoff < kBitsPerInt; ++bitoff) {
if ((rset & (1 << bitoff)) != 0) { if ((rset & (1 << bitoff)) != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment