Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[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 "mc/mc.h"
10 #include "xbt/automaton.h"
11
12 #ifdef __cplusplus
13 #include "src/mc/mc_forward.hpp"
14 #include "src/xbt/memory_map.hpp"
15 #endif
16
17 #ifdef __cplusplus
18 namespace simgrid {
19 namespace mc {
20
21 struct DerefAndCompareByActorsCountAndUsedHeap {
22   template<class X, class Y>
23   bool operator()(X const& a, Y const& b)
24   {
25     return std::make_pair(a->actors_count, a->heap_bytes_used) < std::make_pair(b->actors_count, b->heap_bytes_used);
26   }
27 };
28
29 }
30 }
31 #endif
32
33 SG_BEGIN_DECL()
34
35 /********************************* MC Global **********************************/
36
37 XBT_PRIVATE void MC_init_dot_output();
38
39 XBT_PRIVATE extern FILE *dot_output;
40
41 XBT_PRIVATE void MC_show_deadlock(void);
42
43 /********************************** Snapshot comparison **********************************/
44
45 //#define MC_DEBUG 1
46 #define MC_VERBOSE 1
47
48 /********************************** Miscellaneous **********************************/
49
50 SG_END_DECL()
51
52 #ifdef __cplusplus
53
54 namespace simgrid {
55 namespace mc {
56
57 XBT_PRIVATE void find_object_address(
58   std::vector<simgrid::xbt::VmMap> const& maps, simgrid::mc::ObjectInformation* result);
59
60 XBT_PRIVATE
61 int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc::Snapshot* s2);
62
63 // Move is somewhere else (in the LivenessChecker class, in the Session class?):
64 extern XBT_PRIVATE xbt_automaton_t property_automaton;
65
66 }
67 }
68
69 #endif
70
71 #endif