Commit 436c0e9b authored by Simon Marlow's avatar Simon Marlow Committed by Ben Gamari
Browse files

findPtr: don't search the nursery

Test Plan: Used it in anger

Reviewers: bgamari, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4873
parent a5eaa0f9
......@@ -13,6 +13,7 @@
#include "rts/Bytecodes.h" /* for InstrPtr */
#include "sm/Storage.h"
#include "sm/GCThread.h"
#include "Hash.h"
#include "Printer.h"
#include "RtsUtils.h"
......@@ -825,11 +826,16 @@ findPtr(P_ p, int follow)
int i = 0;
searched = 0;
#if 0
// We can't search the nursery, because we don't know which blocks contain
// valid data, because the bd->free pointers in the nursery are only reset
// just before a block is used.
for (n = 0; n < n_capabilities; n++) {
bd = nurseries[i].blocks;
i = findPtrBlocks(p,bd,arr,arr_size,i);
if (i >= arr_size) return;
}
#endif
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
bd = generations[g].blocks;
......@@ -837,6 +843,13 @@ findPtr(P_ p, int follow)
bd = generations[g].large_objects;
i = findPtrBlocks(p,bd,arr,arr_size,i);
if (i >= arr_size) return;
for (n = 0; n < n_capabilities; n++) {
i = findPtrBlocks(p, gc_threads[n]->gens[g].part_list,
arr, arr_size, i);
i = findPtrBlocks(p, gc_threads[n]->gens[g].todo_bd,
arr, arr_size, i);
}
if (i >= arr_size) return;
}
if (follow && i == 1) {
debugBelch("-->\n");
......
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