X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4074a0a83ba4892a329b517e506dab40e3db462e..a49a03122b2def71ff741e78d15b38cd1d171184:/src/mc/mc_record.h diff --git a/src/mc/mc_record.h b/src/mc/mc_record.h index db7636ffac..56a341008c 100644 --- a/src/mc/mc_record.h +++ b/src/mc/mc_record.h @@ -1,10 +1,10 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -/** \file +/** \file mc_record.h + * * This file contains the MC replay/record functionnality. * A MC path may be recorded by using ``-cfg=model-check/record:1`'`. * The path is written in the log output and an be replayed with MC disabled @@ -17,32 +17,17 @@ #ifndef SIMGRID_MC_RECORD_H #define SIMGRID_MC_RECORD_H -#include -#include +#include "src/mc/Transition.hpp" +#include "xbt/base.h" -#include +#include namespace simgrid { namespace mc { -/** An element in the recorded path - * - * At each decision point, we need to record which process transition - * is trigerred and potentially which value is associated with this - * transition. The value is used to find which communication is triggerred - * in things like waitany and for associating a given value of MC_random() - * calls. - */ -struct RecordTraceElement { - int pid = 0; - int value = 0; - RecordTraceElement() {} - RecordTraceElement(int pid, int value) : pid(pid), value(value) {} -}; - -typedef std::vector RecordTrace; +typedef std::vector RecordTrace; -/** Convert a string representation of the path into a array of `simgrid::mc::RecordTraceElement` +/** Convert a string representation of the path into a array of `simgrid::mc::Transition` */ XBT_PRIVATE RecordTrace parseRecordTrace(const char* data); XBT_PRIVATE std::string traceToString(simgrid::mc::RecordTrace const& trace);