count profiling entries from meta-calls, even if that means a little more

work.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@593 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-09-17 00:02:39 +00:00
parent e09b7fa8ad
commit 8ba604d9b3
2 changed files with 7 additions and 1 deletions

View File

@ -53,7 +53,13 @@ CallPredicate(PredEntry *pen, choiceptr cut_pt) {
#endif /* LOW_LEVEL_TRACE */ #endif /* LOW_LEVEL_TRACE */
CP = P; CP = P;
P = (yamop *)(pen->CodeOfPred); P = (yamop *)(pen->CodeOfPred);
/* vsc: increment reduction counter at meta-call entry */
WRITE_UNLOCK(pen->PRWLock); WRITE_UNLOCK(pen->PRWLock);
if (pen->PredFlags & ProfiledPredFlag) {
LOCK(pen->StatisticsForPred.lock);
pen->StatisticsForPred.NOfEntries++;
UNLOCK(pen->StatisticsForPred.lock);
}
ENV = YENV; ENV = YENV;
YENV = ASP; YENV = ASP;
YENV[E_CB] = (CELL) cut_pt; YENV[E_CB] = (CELL) cut_pt;

View File

@ -17,7 +17,7 @@
:- meta_predicate profile_data(:,+,-). :- meta_predicate profile_data(:,+,-).
profile_data(P, Parm, Data) :- P = M:D, !, profile_data(M:D, Parm, Data) :- P = M:D, !,
( (
var(M) -> var(M) ->
'$do_error'(instantiation_error,profile_data(M:D, Parm, Data)) '$do_error'(instantiation_error,profile_data(M:D, Parm, Data))