summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2020-11-06 17:02:05 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2020-11-06 17:02:05 +0000
commitd706867646ba4702a4069b413d7b6b37d66324b7 (patch)
tree2ccb405e840022e2b5f0684ce3c3edb406e3b91f
parentac3ec471f6be9066d1978261e46c9e2fd17e4a23 (diff)
downloadhaskell-wip/con-info-ghc-debug.tar.gz
Info table rather than closurewip/con-info-ghc-debug
-rw-r--r--includes/rts/IPE.h2
-rw-r--r--rts/IPE.c9
-rw-r--r--rts/PrimOps.cmm4
3 files changed, 8 insertions, 7 deletions
diff --git a/includes/rts/IPE.h b/includes/rts/IPE.h
index 61b0915382..dc34d3d9e9 100644
--- a/includes/rts/IPE.h
+++ b/includes/rts/IPE.h
@@ -14,4 +14,4 @@
#pragma once
void registerInfoProvList(InfoProvEnt **cc_list);
-InfoProvEnt * lookupIPE(StgClosure *info); \ No newline at end of file
+InfoProvEnt * lookupIPE(StgInfoTable *info); \ No newline at end of file
diff --git a/rts/IPE.c b/rts/IPE.c
index 1de551653a..38f69fa9bd 100644
--- a/rts/IPE.c
+++ b/rts/IPE.c
@@ -69,18 +69,17 @@ void registerInfoProvList(InfoProvEnt **ent_list)
// MP: TODO: This should not be a linear search, need to improve
// the IPE_LIST structure
-InfoProvEnt * lookupIPE(StgClosure *clos)
+InfoProvEnt * lookupIPE(StgInfoTable *info)
{
- StgInfoTable * info;
- info = GET_INFO(clos);
InfoProvEnt *ip, *next;
- //printf("%p\n", info);
+// printf("%p\n", info);
//printf("%p\n\n", clos);
for (ip = IPE_LIST; ip != NULL; ip = next) {
+// printf("%p\n", ip->info);
if (ip->info == info) {
//printf("Found %p\n", ip->info);
return ip;
}
next = ip->link;
}
-} \ No newline at end of file
+}
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 249228cfae..7102600e80 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -2412,7 +2412,9 @@ stg_closureSizzezh (P_ clos)
stg_whereFromzh (P_ clos)
{
P_ ipe;
- (ipe) = foreign "C" lookupIPE(UNTAG(clos) "ptr");
+ W_ info;
+ info = GET_INFO(UNTAG(clos));
+ (ipe) = foreign "C" lookupIPE(info "ptr");
return (ipe);
}