action: remove clockvector flag from print() method
authorBrian Norris <banorris@uci.edu>
Wed, 3 Oct 2012 23:29:59 +0000 (16:29 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 3 Oct 2012 23:29:59 +0000 (16:29 -0700)
We don't actually need to tell ModelAction::print() when to print the
associated clock vector. The introduction of the 'print_cv' boolean flag
was to fix a separate bug that has been fixed. Now the clock vector can
be printed unconditionally, when it exists.

action.cc
action.h
model.cc

index c5912ff2ef51d5ac5dd0371f96caf7519a5dd2a0..08fe10677c5d1e7e518c15fc27a4638c7f4494f4 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -293,13 +293,8 @@ bool ModelAction::happens_before(const ModelAction *act) const
        return act->cv->synchronized_since(this);
 }
 
-/**
- * Print nicely-formatted info about this ModelAction
- *
- * @param print_cv True if we want to print clock vector data. Might be false,
- * for instance, in situations where the clock vector might be invalid
- */
-void ModelAction::print(bool print_cv) const
+/** @brief Print nicely-formatted info about this ModelAction */
+void ModelAction::print() const
 {
        const char *type_str, *mo_str;
        switch (this->type) {
@@ -383,7 +378,7 @@ void ModelAction::print(bool print_cv) const
                else
                        printf(" Rf: ?");
        }
-       if (cv && print_cv) {
+       if (cv) {
                printf("\t");
                cv->print();
        } else
index 8dc88430f2b093969c00ed9f4cff18163072d776..32cada2b9db88f306cf3dc52df6b1bd473640709 100644 (file)
--- a/action.h
+++ b/action.h
@@ -66,7 +66,7 @@ class ModelAction {
 public:
        ModelAction(action_type_t type, memory_order order, void *loc, uint64_t value = VALUE_NONE);
        ~ModelAction();
-       void print(bool print_cv = true) const;
+       void print() const;
 
        thread_id_t get_tid() const { return tid; }
        action_type get_type() const { return type; }
index 21b2b77b16c83cced2f13730e8f0ac2e59bcc577..e3d9203eea60ec53010d67bb87da20331cfbf642 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -199,7 +199,7 @@ bool ModelChecker::next_execution()
        if (isfinalfeasible()) {
                printf("Earliest divergence point since last feasible execution:\n");
                if (earliest_diverge)
-                       earliest_diverge->print(false);
+                       earliest_diverge->print();
                else
                        printf("(Not set)\n");