Using LOG instead of DEBUG
authorHamed Gorjiara <hgorjiar@uci.edu>
Wed, 17 Oct 2018 22:34:03 +0000 (15:34 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Wed, 17 Oct 2018 22:34:03 +0000 (15:34 -0700)
src/Tuner/multituner.cc
src/common.h

index 5103414..97893b7 100644 (file)
@@ -234,8 +234,8 @@ void MultiTuner::tuneComp() {
                                        if (tuner->getTime(problem) == -1) {
                                                tuner->problems.push(problem);
                                        }
-                                       DEBUG("%u.Problem<%s>\tTuner<%p>\tMetric<%lld>\n", i, problem->problem,tuner, metric);
-                                       DEBUG("*****************************\n");
+                                       LOG("%u.Problem<%s>\tTuner<%p>\tMetric<%lld>\n", i, problem->problem,tuner, metric);
+                                       LOG("*****************************\n");
                                        if (metric != -1)
                                                tuner->setTime(problem, metric);
                                }
@@ -245,7 +245,7 @@ void MultiTuner::tuneComp() {
                                                if (metric < places.get(k)->getTime(problem))
                                                        break;
                                        }
-                                       DEBUG("place[%u]=Tuner<%p>\n", k, tuner);
+                                       LOG("place[%u]=Tuner<%p>\n", k, tuner);
                                        places.insertAt(k, tuner);
                                }
                        }
@@ -256,8 +256,8 @@ void MultiTuner::tuneComp() {
                                if (scores.contains(tuner))
                                        currScore = scores.get(tuner);
                                currScore += points;
-                               DEBUG("Problem<%s>\tTuner<%p>\tmetric<%d>\n", problem->problem, tuner, currScore);
-                               DEBUG("**************************\n");
+                               LOG("Problem<%s>\tTuner<%p>\tmetric<%d>\n", problem->problem, tuner, currScore);
+                               LOG("**************************\n");
                                scores.put(tuner, currScore);
                                points = points / 3;
                        }
@@ -277,11 +277,11 @@ void MultiTuner::tuneComp() {
                                if (score < tscore)
                                        break;
                        }
-                       DEBUG("ranking[%u]=tuner<%p>(Score=%d)\n", j, tuner, score);
-                       DEBUG("************************\n");
+                       LOG("ranking[%u]=tuner<%p>(Score=%d)\n", j, tuner, score);
+                       LOG("************************\n");
                        ranking.insertAt(j, tuner);
                }
-               DEBUG("tunerSize=%u\trankingSize=%u\ttunerVSize=%u\n", tuners.getSize(), ranking.getSize(), tunerV->getSize());
+               LOG("tunerSize=%u\trankingSize=%u\ttunerVSize=%u\n", tuners.getSize(), ranking.getSize(), tunerV->getSize());
                for (uint i = tuners.getSize(); i < ranking.getSize(); i++) {
                        TunerRecord *tuner = ranking.get(i);
                        model_print("Removing tuner %u\n", tuner->tunernumber);
index 48b2a7e..2b67e04 100644 (file)
@@ -40,6 +40,7 @@ extern int switch_alloc;
 #ifdef CONFIG_DEBUG
 #define DEBUG(fmt, ...) do { model_print("*** %15s:%-4d %25s() *** " fmt, __FILE__, __LINE__, __func__, ## __VA_ARGS__); } while (0)
 #define DBG() DEBUG("\n")
+#define LOG(fmt, ...) do{model_print(fmt, ## __VA_ARGS__);}while(0)
 #define DBG_ENABLED() (1)
 #else
 #define DEBUG(fmt, ...)