Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : - move some debug statements from STATS to SOLVER
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Wed, 17 Jun 2009 17:00:43 +0200
  • Message-id: <E1MGwdR-0003xY-10@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit b6b7231600b6e10c84afc381e4a601e6661229d8
Author: Michael Schroeder <mls@xxxxxxx>
Date: Wed Jun 17 17:00:43 2009 +0200

- move some debug statements from STATS to SOLVER
---
src/pool.c | 2 +-
src/pool.h | 2 ++
src/solver.c | 16 ++++++++--------
3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/pool.c b/src/pool.c
index 56d5747..73fc1c2 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -749,7 +749,7 @@ pool_setdebuglevel(Pool *pool, int level)
{
int mask = SAT_DEBUG_RESULT;
if (level > 0)
- mask |= SAT_DEBUG_STATS|SAT_DEBUG_ANALYZE|SAT_DEBUG_UNSOLVABLE;
+ mask |=
SAT_DEBUG_STATS|SAT_DEBUG_ANALYZE|SAT_DEBUG_UNSOLVABLE|SAT_DEBUG_SOLVER|SAT_DEBUG_TRANSACTION;
if (level > 1)
mask |= SAT_DEBUG_JOB|SAT_DEBUG_SOLUTIONS|SAT_DEBUG_POLICY;
if (level > 2)
diff --git a/src/pool.h b/src/pool.h
index e9959ee..2e657ad 100644
--- a/src/pool.h
+++ b/src/pool.h
@@ -132,6 +132,8 @@ struct _Pool {
#define SAT_DEBUG_RESULT (1<<10)
#define SAT_DEBUG_JOB (1<<11)
#define SAT_DEBUG_SCHUBI (1<<12)
+#define SAT_DEBUG_SOLVER (1<<13)
+#define SAT_DEBUG_TRANSACTION (1<<14)

//-----------------------------------------------

diff --git a/src/solver.c b/src/solver.c
index 132f7f4..dc1b229 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1331,7 +1331,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
solver_printruleclass(solv, SAT_DEBUG_RULE_CREATION, solv->rules + i);
}

- POOL_DEBUG(SAT_DEBUG_STATS, "initial decisions: %d\n",
solv->decisionq.count);
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "initial decisions: %d\n",
solv->decisionq.count);

IF_POOLDEBUG (SAT_DEBUG_SCHUBI)
solver_printdecisions(solv);
@@ -1377,7 +1377,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)

if (level < systemlevel)
{
- POOL_DEBUG(SAT_DEBUG_STATS, "resolving job rules\n");
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "resolving job rules\n");
for (i = solv->jobrules, r = solv->rules + i; i < solv->jobrules_end;
i++, r++)
{
Id l;
@@ -1892,7 +1892,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
int installedone = 0;

/* let's see if we can install some unsupported package */
- POOL_DEBUG(SAT_DEBUG_STATS, "deciding unsupported packages\n");
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "deciding unsupported packages\n");
for (i = 0; i < solv->orphaned.count; i++)
{
p = solv->orphaned.elements[i];
@@ -1901,12 +1901,12 @@ solver_run_sat(Solver *solv, int disablerules, int
doweak)
olevel = level;
if (solv->distupgrade_removeunsupported)
{
- POOL_DEBUG(SAT_DEBUG_STATS, "removing unsupported %s\n",
solvid2str(pool, p));
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "removing unsupported %s\n",
solvid2str(pool, p));
level = setpropagatelearn(solv, level, -p, 0, 0);
}
else
{
- POOL_DEBUG(SAT_DEBUG_STATS, "keeping unsupported %s\n",
solvid2str(pool, p));
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "keeping unsupported %s\n",
solvid2str(pool, p));
level = setpropagatelearn(solv, level, p, 0, 0);
installedone = 1;
}
@@ -1930,7 +1930,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
if (solv->branches.elements[i - 1] < 0)
break;
p = solv->branches.elements[i];
- POOL_DEBUG(SAT_DEBUG_STATS, "branching with %s\n",
solvid2str(pool, p));
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "branching with %s\n",
solvid2str(pool, p));
queue_empty(&dq);
for (j = i + 1; j < solv->branches.count; j++)
queue_push(&dq, solv->branches.elements[j]);
@@ -1979,7 +1979,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
/* kill old solvable so that we do not loop */
p = solv->branches.elements[lasti];
solv->branches.elements[lasti] = 0;
- POOL_DEBUG(SAT_DEBUG_STATS, "minimizing %d -> %d with %s\n",
solv->decisionmap[p], lastl, solvid2str(pool, p));
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "minimizing %d -> %d with %s\n",
solv->decisionmap[p], lastl, solvid2str(pool, p));
minimizationsteps++;

level = lastl;
@@ -2805,7 +2805,7 @@ solver_solve(Solver *solv, Queue *job)

/* make decisions based on job/update assertions */
makeruledecisions(solv);
- POOL_DEBUG(SAT_DEBUG_STATS, "problems so far: %d\n", solv->problems.count);
+ POOL_DEBUG(SAT_DEBUG_SOLVER, "problems so far: %d\n", solv->problems.count);

/*
* ********************************************
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages