Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
smx processes are now called actors, avoiding confusions in MC
[simgrid.git] / src / mc / mc_private.h
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_MC_PRIVATE_H
8 #define SIMGRID_MC_PRIVATE_H
9
10 #include "simgrid_config.h"
11
12 #include <sys/types.h>
13
14 #include <stdio.h>
15
16 #include <simgrid/msg.h>
17 #include <xbt/config.h>
18 #include <xbt/base.h>
19 #include <xbt/automaton.h>
20
21 #include "mc/mc.h"
22 #include "mc/datatypes.h"
23 #include "src/mc/mc_base.h"
24
25 #include "src/simix/smx_private.h"
26
27 #ifdef __cplusplus
28 #include "src/mc/mc_forward.hpp"
29 #include "src/xbt/memory_map.hpp"
30 #endif
31
32 #ifdef __cplusplus
33 namespace simgrid {
34 namespace mc {
35
36 struct DerefAndCompareByActorsCountAndUsedHeap {
37   template<class X, class Y>
38   bool operator()(X const& a, Y const& b)
39   {
40     return std::make_pair(a->actors_count, a->heap_bytes_used) < std::make_pair(b->actors_count, b->heap_bytes_used);
41   }
42 };
43
44 }
45 }
46 #endif
47
48 SG_BEGIN_DECL()
49
50 /********************************* MC Global **********************************/
51
52 XBT_PRIVATE void MC_init_dot_output();
53
54 XBT_PRIVATE extern FILE *dot_output;
55
56 XBT_PRIVATE void MC_show_deadlock(void);
57
58 /********************************** Snapshot comparison **********************************/
59
60 //#define MC_DEBUG 1
61 #define MC_VERBOSE 1
62
63 /********************************** Miscellaneous **********************************/
64
65 SG_END_DECL()
66
67 #ifdef __cplusplus
68
69 namespace simgrid {
70 namespace mc {
71
72 XBT_PRIVATE void find_object_address(
73   std::vector<simgrid::xbt::VmMap> const& maps, simgrid::mc::ObjectInformation* result);
74
75 XBT_PRIVATE
76 int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc::Snapshot* s2);
77
78 // Move is somewhere else (in the LivenessChecker class, in the Session class?):
79 extern XBT_PRIVATE xbt_automaton_t property_automaton;
80
81 }
82 }
83
84 #endif
85
86 #endif