From: Gabriel Corona Date: Thu, 10 Mar 2016 13:42:12 +0000 (+0100) Subject: [mc] Remove useless extern "C" around logging categories X-Git-Tag: v3_13~451^2~9 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/603c44e45e00a577bccb42cf398a924178f17768 [mc] Remove useless extern "C" around logging categories --- diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 636f3ecb92..a385dfc6e4 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -32,12 +32,8 @@ #include "src/mc/mc_exit.h" #include "src/mc/mc_liveness.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker"); -} - ::simgrid::mc::ModelChecker* mc_model_checker = nullptr; using simgrid::mc::remote; diff --git a/src/mc/PageStore.cpp b/src/mc/PageStore.cpp index 3289157eb9..9b196b8cde 100644 --- a/src/mc/PageStore.cpp +++ b/src/mc/PageStore.cpp @@ -15,8 +15,6 @@ #include "src/mc/mc_mmu.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_page_snapshot, mc, "Logging specific to mc_page_snapshot"); @@ -230,5 +228,3 @@ XBT_TEST_UNIT("base", test_mc_page_store, "Test adding/removing pages in the sto } #endif /* SIMGRID_TEST */ - -} diff --git a/src/mc/Process.cpp b/src/mc/Process.cpp index 5dfae37630..f9099a26b2 100644 --- a/src/mc/Process.cpp +++ b/src/mc/Process.cpp @@ -41,13 +41,9 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc, "MC process information"); -} - // ***** Helper stuff namespace simgrid { diff --git a/src/mc/RegionSnapshot.cpp b/src/mc/RegionSnapshot.cpp index 0c80a3bd95..fc74d88e8d 100644 --- a/src/mc/RegionSnapshot.cpp +++ b/src/mc/RegionSnapshot.cpp @@ -14,13 +14,9 @@ #include "src/mc/ChunkedData.hpp" #include "src/mc/RegionSnapshot.hpp" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_RegionSnaphot, mc, "Logging specific to region snapshots"); -} - namespace simgrid { namespace mc { diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index dd609ad2ca..f68fc96a9b 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -31,12 +31,8 @@ using simgrid::mc::remote; #endif -extern "C" { - XBT_LOG_NEW_CATEGORY(mc, "All MC categories"); -} - int MC_random(int min, int max) { xbt_assert(mc_mode != MC_MODE_SERVER); diff --git a/src/mc/mc_checkpoint.cpp b/src/mc/mc_checkpoint.cpp index 99b11bc3ef..171db1830b 100644 --- a/src/mc/mc_checkpoint.cpp +++ b/src/mc/mc_checkpoint.cpp @@ -42,13 +42,9 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc, "Logging specific to mc_checkpoint"); -} - namespace simgrid { namespace mc { diff --git a/src/mc/mc_client.cpp b/src/mc/mc_client.cpp index cb822245a6..a173b8f884 100644 --- a/src/mc/mc_client.cpp +++ b/src/mc/mc_client.cpp @@ -23,10 +23,10 @@ #include "src/mc/mc_private.h" // MC_deadlock_check() #include "src/mc/mc_smx.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic"); +extern "C" { + mc_client_t mc_client; void MC_client_init(void) diff --git a/src/mc/mc_client_api.cpp b/src/mc/mc_client_api.cpp index 9433798db9..da2fece992 100644 --- a/src/mc/mc_client_api.cpp +++ b/src/mc/mc_client_api.cpp @@ -22,13 +22,9 @@ * communicate with the MC (declared in modelchecker.h). */ -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client_api, mc, "Public API for the model-checked application"); -} - // MC_random() is in mc_base.cpp void MC_assert(int prop) diff --git a/src/mc/mc_comm_determinism.cpp b/src/mc/mc_comm_determinism.cpp index f1119d2330..08366263ff 100644 --- a/src/mc/mc_comm_determinism.cpp +++ b/src/mc/mc_comm_determinism.cpp @@ -24,11 +24,11 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc, "Logging specific to MC communication determinism detection"); +extern "C" { + /********** Global variables **********/ xbt_dynar_t initial_communications_pattern; diff --git a/src/mc/mc_comm_pattern.cpp b/src/mc/mc_comm_pattern.cpp index 0a5ff5eda9..3c8966988c 100644 --- a/src/mc/mc_comm_pattern.cpp +++ b/src/mc/mc_comm_pattern.cpp @@ -15,11 +15,11 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_pattern, mc, "Logging specific to MC communication patterns"); +extern "C" { + mc_comm_pattern_t MC_comm_pattern_dup(mc_comm_pattern_t comm) { mc_comm_pattern_t res = xbt_new0(s_mc_comm_pattern_t, 1); diff --git a/src/mc/mc_compare.cpp b/src/mc/mc_compare.cpp index 232feecd25..8aaaefb988 100644 --- a/src/mc/mc_compare.cpp +++ b/src/mc/mc_compare.cpp @@ -32,13 +32,9 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, xbt, "Logging specific to mc_compare in mc"); -} - namespace simgrid { namespace mc { diff --git a/src/mc/mc_config.cpp b/src/mc/mc_config.cpp index a0ddac8c5f..56446845ee 100644 --- a/src/mc/mc_config.cpp +++ b/src/mc/mc_config.cpp @@ -20,13 +20,9 @@ #include "src/mc/mc_record.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc, "Configuration of MC"); -} - #if HAVE_MC namespace simgrid { namespace mc { diff --git a/src/mc/mc_diff.cpp b/src/mc/mc_diff.cpp index f7e1e8eb1a..e877474420 100644 --- a/src/mc/mc_diff.cpp +++ b/src/mc/mc_diff.cpp @@ -18,11 +18,11 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt, "Logging specific to mc_diff in mc"); +extern "C" { + /*********************************** Heap comparison ***********************************/ /***************************************************************************************/ diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index b84e5eb7e5..128e8772f9 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -42,13 +42,9 @@ #include "src/mc/mc_protocol.h" #include "src/mc/mc_client.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)"); -} - e_mc_mode_t mc_mode; namespace simgrid { diff --git a/src/mc/mc_ignore.cpp b/src/mc/mc_ignore.cpp index e04d7fcb5d..51d781c403 100644 --- a/src/mc/mc_ignore.cpp +++ b/src/mc/mc_ignore.cpp @@ -12,11 +12,11 @@ #include "src/mc/mc_protocol.h" #include "src/mc/mc_client.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ignore, mc, "Logging specific to MC ignore mechanism"); +extern "C" { + // ***** Model-checked void MC_ignore_heap(void *address, size_t size) diff --git a/src/mc/mc_liveness.cpp b/src/mc/mc_liveness.cpp index 718fe43bb1..e57d81f4ba 100644 --- a/src/mc/mc_liveness.cpp +++ b/src/mc/mc_liveness.cpp @@ -26,13 +26,9 @@ #include "src/mc/mc_safety.h" #include "src/mc/mc_exit.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc, "Logging specific to algorithms for liveness properties verification"); -} - /********* Global variables *********/ xbt_dynar_t acceptance_pairs; diff --git a/src/mc/mc_memory.cpp b/src/mc/mc_memory.cpp index 5a452f605c..1db534b1c4 100644 --- a/src/mc/mc_memory.cpp +++ b/src/mc/mc_memory.cpp @@ -12,11 +12,11 @@ #include "mc/mc.h" #include "src/mc/mc_private.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_memory, mc, "Logging specific to MC (memory)"); +extern "C" { + /* Initialize the model-checker memory subsystem */ /* It creates the two heap regions: std_heap and mc_heap */ void MC_memory_init() diff --git a/src/mc/mc_protocol.cpp b/src/mc/mc_protocol.cpp index 027bdda8e1..55ab2954e6 100644 --- a/src/mc/mc_protocol.cpp +++ b/src/mc/mc_protocol.cpp @@ -17,10 +17,10 @@ #include "src/mc/mc_protocol.h" #include "src/mc/mc_client.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_protocol, mc, "Generic MC protocol logic"); +extern "C" { + int MC_protocol_send(int socket, const void* message, std::size_t size) { XBT_DEBUG("Protocol [%s] send %s", diff --git a/src/mc/mc_record.cpp b/src/mc/mc_record.cpp index 216356d274..494f961248 100644 --- a/src/mc/mc_record.cpp +++ b/src/mc/mc_record.cpp @@ -29,11 +29,11 @@ #include "src/mc/mc_liveness.h" #endif -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc, " Logging specific to MC record/replay facility"); +extern "C" { + char* MC_record_path = nullptr; void MC_record_replay(mc_record_item_t start, std::size_t len) diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index d6be4512d5..9500f33537 100644 --- a/src/mc/mc_request.cpp +++ b/src/mc/mc_request.cpp @@ -19,13 +19,9 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc, "Logging specific to MC (request)"); -} - static char *pointer_to_string(void *pointer); static char *buff_size_to_string(size_t size); diff --git a/src/mc/mc_safety.cpp b/src/mc/mc_safety.cpp index 74fde12485..98e8d4d819 100644 --- a/src/mc/mc_safety.cpp +++ b/src/mc/mc_safety.cpp @@ -25,13 +25,9 @@ #include "src/xbt/mmalloc/mmprivate.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_safety, mc, "Logging specific to MC safety verification "); -} - namespace simgrid { namespace mc { diff --git a/src/mc/mc_state.cpp b/src/mc/mc_state.cpp index 510a7dee23..741ba37a1e 100644 --- a/src/mc/mc_state.cpp +++ b/src/mc/mc_state.cpp @@ -20,11 +20,11 @@ using simgrid::mc::remote; -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_state, mc, "Logging specific to MC (state)"); +extern "C" { + /** * \brief Creates a state data structure used by the exploration algorithm */ diff --git a/src/mc/mc_visited.cpp b/src/mc/mc_visited.cpp index 54ea67b4ac..e87f274e87 100644 --- a/src/mc/mc_visited.cpp +++ b/src/mc/mc_visited.cpp @@ -20,13 +20,9 @@ #include "src/mc/Process.hpp" #include "src/mc/mc_smx.h" -extern "C" { - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_visited, mc, "Logging specific to state equaity detection mechanisms"); -} - namespace simgrid { namespace mc {