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:
parent
e09b7fa8ad
commit
8ba604d9b3
6
C/exec.c
6
C/exec.c
@ -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;
|
||||||
|
@ -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))
|
||||||
|
Reference in New Issue
Block a user