Logo AND Algorithmique Numérique Distribuée

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