From: Martin Quinson Date: Wed, 4 Apr 2018 23:50:34 +0000 (+0200) Subject: reduce the scope of some #include, and cut useless ones X-Git-Tag: v3.20~520 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/17c819afc4ceda4000eec137c8fee35168253b4d reduce the scope of some #include, and cut useless ones I'm sick of recompiling everything each time I change a line. --- diff --git a/src/include/surf/surf.hpp b/src/include/surf/surf.hpp index 9252170622..06fab3fd9c 100644 --- a/src/include/surf/surf.hpp +++ b/src/include/surf/surf.hpp @@ -7,12 +7,7 @@ #define SURF_SURF_H #include "simgrid/forward.h" -#include "src/internal_config.h" -#include "xbt/config.h" -#include "xbt/dict.h" -#include "xbt/dynar.h" #include "xbt/graph.h" -#include "xbt/misc.h" namespace simgrid { namespace surf { diff --git a/src/instr/instr_private.hpp b/src/instr/instr_private.hpp index 0004fa948b..a2cf5a17af 100644 --- a/src/instr/instr_private.hpp +++ b/src/instr/instr_private.hpp @@ -17,6 +17,7 @@ #include "src/instr/instr_paje_values.hpp" #include "src/internal_config.h" #include "xbt/graph.h" + #include /** std::setprecision **/ #include #include diff --git a/src/kernel/activity/MutexImpl.cpp b/src/kernel/activity/MutexImpl.cpp index 066bfb23a9..bd03220da8 100644 --- a/src/kernel/activity/MutexImpl.cpp +++ b/src/kernel/activity/MutexImpl.cpp @@ -5,8 +5,7 @@ #include "src/kernel/activity/MutexImpl.hpp" #include "src/kernel/activity/SynchroRaw.hpp" - -#include "src/simix/smx_private.hpp" +#include "src/simix/smx_synchro_private.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_mutex, simix_synchro, "Mutex kernel-space implementation"); diff --git a/src/kernel/activity/SynchroIo.cpp b/src/kernel/activity/SynchroIo.cpp index e0158cf8e9..3d861d5be1 100644 --- a/src/kernel/activity/SynchroIo.cpp +++ b/src/kernel/activity/SynchroIo.cpp @@ -5,8 +5,7 @@ #include "src/kernel/activity/SynchroIo.hpp" #include "simgrid/kernel/resource/Action.hpp" -#include "src/simix/smx_private.hpp" -#include "src/surf/surf_interface.hpp" +#include "src/simix/smx_io_private.hpp" void simgrid::kernel::activity::IoImpl::suspend() { diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index 373df85487..443aa52644 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -6,32 +6,11 @@ #ifndef SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP #define SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP -#include -#include -#include -#include - -#include - -#include "simgrid/simix.h" -#include "src/instr/instr_private.hpp" +#include "instr/instr_interface.h" #include "src/internal_config.h" -#include "src/simix/popping_private.hpp" -#include "src/simix/smx_host_private.hpp" -#include "src/simix/smx_io_private.hpp" #include "src/simix/smx_network_private.hpp" -#include "src/simix/smx_synchro_private.hpp" -#include "surf/surf.hpp" -#include "xbt/base.h" -#include "xbt/config.h" -#include "xbt/function_types.h" -#include "xbt/mallocator.h" -#include "xbt/xbt_os_time.h" - -#include "src/simix/ActorImpl.hpp" -#include -#include +#include namespace simgrid { namespace kernel { diff --git a/src/kernel/lmm/fair_bottleneck.cpp b/src/kernel/lmm/fair_bottleneck.cpp index bb1bd489ca..1577188839 100644 --- a/src/kernel/lmm/fair_bottleneck.cpp +++ b/src/kernel/lmm/fair_bottleneck.cpp @@ -4,8 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/lmm/maxmin.hpp" -#include "xbt/log.h" +#include "src/surf/surf_interface.hpp" #include "xbt/sysdep.h" + #include #include #include diff --git a/src/kernel/lmm/lagrange.cpp b/src/kernel/lmm/lagrange.cpp index 8d6cb06ae6..17fe3d08b1 100644 --- a/src/kernel/lmm/lagrange.cpp +++ b/src/kernel/lmm/lagrange.cpp @@ -8,6 +8,7 @@ * "ssh://username@scm.gforge.inria.fr/svn/memo/people/pvelho/lagrange/ppf.ps". */ #include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/surf_interface.hpp" #include "xbt/log.h" #include "xbt/sysdep.h" diff --git a/src/kernel/lmm/maxmin.cpp b/src/kernel/lmm/maxmin.cpp index d33ce2365e..adeee26ea5 100644 --- a/src/kernel/lmm/maxmin.cpp +++ b/src/kernel/lmm/maxmin.cpp @@ -3,20 +3,9 @@ /* 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 callbacks.h */ - #include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/surf_interface.hpp" #include "xbt/backtrace.hpp" -#include "xbt/log.h" -#include "xbt/mallocator.h" -#include "xbt/sysdep.h" -#include "xbt/utility.hpp" -#include -#include -#include -#include -#include -#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)"); diff --git a/src/kernel/lmm/maxmin.hpp b/src/kernel/lmm/maxmin.hpp index 469068384c..67b6f78216 100644 --- a/src/kernel/lmm/maxmin.hpp +++ b/src/kernel/lmm/maxmin.hpp @@ -7,13 +7,8 @@ #define SURF_MAXMIN_HPP #include "simgrid/kernel/resource/Action.hpp" -#include "src/internal_config.h" -#include "src/surf/surf_interface.hpp" -#include "surf/surf.hpp" #include "xbt/asserts.h" #include "xbt/mallocator.h" -#include "xbt/misc.h" -#include "xbt/utility.hpp" #include #include diff --git a/src/kernel/resource/Action.cpp b/src/kernel/resource/Action.cpp index 39825370df..430c897e31 100644 --- a/src/kernel/resource/Action.cpp +++ b/src/kernel/resource/Action.cpp @@ -7,6 +7,7 @@ #include "simgrid/kernel/resource/Model.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_NEW_CATEGORY(kernel, "Logging specific to the internals of SimGrid"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(resource, kernel, "Logging specific to the resources"); diff --git a/src/kernel/routing/DijkstraZone.cpp b/src/kernel/routing/DijkstraZone.cpp index b26b405e2c..f6ae5a1675 100644 --- a/src/kernel/routing/DijkstraZone.cpp +++ b/src/kernel/routing/DijkstraZone.cpp @@ -7,6 +7,7 @@ #include "simgrid/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" #include #include diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index f1b25bed25..f702344828 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -6,8 +6,8 @@ #include "simgrid/kernel/routing/FloydZone.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" -#include "xbt/log.h" #include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" #include #include diff --git a/src/kernel/routing/FullZone.cpp b/src/kernel/routing/FullZone.cpp index f5c8ab5431..208d9376ba 100644 --- a/src/kernel/routing/FullZone.cpp +++ b/src/kernel/routing/FullZone.cpp @@ -7,6 +7,7 @@ #include "simgrid/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf"); diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index 1caed8f593..7e9aa1d3d9 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -10,7 +10,7 @@ #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" -#include "xbt/log.h" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_route); diff --git a/src/kernel/routing/VivaldiZone.cpp b/src/kernel/routing/VivaldiZone.cpp index 39666c092b..70c2b083ba 100644 --- a/src/kernel/routing/VivaldiZone.cpp +++ b/src/kernel/routing/VivaldiZone.cpp @@ -9,6 +9,7 @@ #include "simgrid/s4u/Host.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" #include diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index faf039d30c..bc4f17d789 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -5,6 +5,7 @@ #include +#include "src/instr/instr_private.hpp" #include "src/kernel/activity/ExecImpl.hpp" #include "src/msg/msg_private.hpp" #include "src/simix/smx_private.hpp" /* MSG_task_listen looks inside the rdv directly. Not clean. */ diff --git a/src/msg/msg_private.hpp b/src/msg/msg_private.hpp index c549ed1f04..972b4eff4a 100644 --- a/src/msg/msg_private.hpp +++ b/src/msg/msg_private.hpp @@ -10,9 +10,6 @@ #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/activity/ExecImpl.hpp" -#include "xbt/Extendable.hpp" - -#include /**************** datatypes **********************************/ /********************************* Task **************************************/ diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index 433e487cb9..94f03ff44f 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -5,6 +5,7 @@ #include "msg_private.hpp" #include "simgrid/s4u/Host.hpp" +#include "src/instr/instr_private.hpp" #include "src/simix/ActorImpl.hpp" #include "src/simix/smx_private.hpp" diff --git a/src/msg/msg_synchro.cpp b/src/msg/msg_synchro.cpp index 15c3ef80db..a1e4886c4d 100644 --- a/src/msg/msg_synchro.cpp +++ b/src/msg/msg_synchro.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2018. 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. */ @@ -8,6 +7,7 @@ #include "msg_private.hpp" #include "src/simix/smx_private.hpp" +#include "src/simix/smx_synchro_private.hpp" #include "xbt/synchro.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_synchro, msg, "Logging specific to MSG (synchro)"); diff --git a/src/plugins/vm/VmLiveMigration.cpp b/src/plugins/vm/VmLiveMigration.cpp index ae70eaf456..ee63525df8 100644 --- a/src/plugins/vm/VmLiveMigration.cpp +++ b/src/plugins/vm/VmLiveMigration.cpp @@ -3,15 +3,11 @@ /* 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. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "src/plugins/vm/VmLiveMigration.hpp" +#include "src/instr/instr_private.hpp" +#include "src/plugins/vm/VirtualMachineImpl.hpp" +#include "src/plugins/vm/VmHostExt.hpp" +#include "xbt/ex.hpp" XBT_LOG_NEW_DEFAULT_CATEGORY(vm_live_migration, "S4U virtual machines live migration"); diff --git a/src/plugins/vm/VmLiveMigration.hpp b/src/plugins/vm/VmLiveMigration.hpp index c965535b13..257faeb776 100644 --- a/src/plugins/vm/VmLiveMigration.hpp +++ b/src/plugins/vm/VmLiveMigration.hpp @@ -1,9 +1,12 @@ -/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2018. 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. */ -#include "simgrid/s4u.hpp" +#include "simgrid/s4u/Comm.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Mailbox.hpp" +#include "simgrid/s4u/VirtualMachine.hpp" #ifndef VM_LIVE_MIGRATION_HPP_ #define VM_LIVE_MIGRATION_HPP_ diff --git a/src/plugins/vm/s4u_VirtualMachine.cpp b/src/plugins/vm/s4u_VirtualMachine.cpp index d69ac57e39..6f436a5459 100644 --- a/src/plugins/vm/s4u_VirtualMachine.cpp +++ b/src/plugins/vm/s4u_VirtualMachine.cpp @@ -9,8 +9,6 @@ #include "src/plugins/vm/VmHostExt.hpp" #include "src/simix/smx_host_private.hpp" #include "src/surf/cpu_cas01.hpp" -#include -#include XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines"); diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 8960fb8366..8803ed0dab 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -3,19 +3,12 @@ /* 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. */ -#include "xbt/log.h" - #include "simgrid/s4u/Actor.hpp" -#include "simgrid/s4u/Comm.hpp" #include "simgrid/s4u/Exec.hpp" #include "simgrid/s4u/Host.hpp" -#include "simgrid/s4u/Mailbox.hpp" - -#include "src/kernel/context/Context.hpp" +#include "src/instr/instr_private.hpp" #include "src/simix/smx_private.hpp" -#include - XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor, "S4U actors"); namespace simgrid { diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 5342c54ae5..481c10ac71 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -1,25 +1,14 @@ -/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2018. 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. */ -#include -#include -#include - -#include - #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/s4u/Host.hpp" -#include "simgrid/s4u/Storage.hpp" -#include "simgrid/simix.hpp" -#include "src/msg/msg_private.hpp" -#include "src/simix/ActorImpl.hpp" -#include "src/simix/smx_private.hpp" +#include "src/simix/smx_host_private.hpp" #include "src/surf/HostImpl.hpp" -#include "src/surf/cpu_interface.hpp" -#include "xbt/log.h" + +#include XBT_LOG_EXTERNAL_CATEGORY(surf_route); diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index a79dfb5555..602f2ae195 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -9,18 +9,13 @@ #include "instr/instr_interface.h" #include "mc/mc.h" #include "simgrid/instr.h" -#include "simgrid/simix.h" -#include "simgrid_config.h" /* what was compiled in? */ +#include "src/internal_config.h" #include "src/kernel/lmm/maxmin.hpp" #include "src/mc/mc_replay.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" #include "xbt/config.h" #include "xbt/config.hpp" -#include "xbt/log.h" -#include "xbt/mallocator.h" -#include "xbt/misc.h" -#include "xbt/sysdep.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf, "About the configuration of SimGrid"); diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 9569b3967a..231296700b 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -3,38 +3,25 @@ /* 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. */ -#include -#include -#include -#include -#include - -#include - -#include "xbt/ex.hpp" -#include "xbt/functional.hpp" -#include "xbt/log.h" -#include "xbt/sysdep.h" -#include "xbt/utility.hpp" - -#include "simgrid/s4u/Host.hpp" - #include "mc/mc.h" - #include "smx_private.hpp" #include "src/kernel/activity/SleepImpl.hpp" #include "src/kernel/activity/SynchroIo.hpp" #include "src/kernel/activity/SynchroRaw.hpp" #include "src/mc/mc_replay.hpp" #include "src/mc/remote/Client.hpp" -#include "src/msg/msg_private.hpp" +#include "src/simix/smx_host_private.hpp" +#include "src/simix/smx_io_private.hpp" +#include "src/simix/smx_synchro_private.hpp" #include "src/surf/cpu_interface.hpp" -#include "src/surf/surf_interface.hpp" +#include "xbt/ex.hpp" #ifdef HAVE_SMPI #include "src/smpi/include/private.hpp" #endif +#include + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX (process)"); unsigned long simix_process_maxpid = 0; diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index f4638defd3..736a0b92b0 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -16,6 +16,7 @@ #include "smx_private.hpp" #include "src/mc/mc_forward.hpp" +#include "src/simix/smx_synchro_private.hpp" #include "xbt/ex.h" #include #include diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 568241c814..78a692de02 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -19,6 +19,8 @@ #if SIMGRID_HAVE_MC #include "src/mc/mc_forward.hpp" #endif +#include "src/simix/smx_host_private.hpp" +#include "src/simix/smx_synchro_private.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping); diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index f3d123cf8e..77ff2ecd3e 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -311,6 +311,9 @@ if __name__ == '__main__': fd.write('#if SIMGRID_HAVE_MC\n') fd.write('#include "src/mc/mc_forward.hpp"\n') fd.write('#endif\n') + fd.write('#include "src/simix/smx_synchro_private.hpp"\n') + fd.write('#include "src/simix/smx_host_private.hpp"\n') + fd.write('\n') fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n') @@ -365,6 +368,8 @@ if __name__ == '__main__': fd.write('#include "xbt/ex.h"\n') fd.write('#include \n') fd.write('#include \n') + fd.write('#include "src/simix/smx_synchro_private.hpp"\n') + fd.write("/** @cond */ // Please Doxygen, don't look at this\n") fd.write(''' template diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 447f55cdbe..0ac25c0a4f 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -3,37 +3,20 @@ /* 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. */ -#include -#include -#include - -#include "src/internal_config.h" -#include /* Signal handling */ -#include - -#include -#include - +#include "mc/mc.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" - -#include "smx_private.hpp" -#include "src/surf/surf_interface.hpp" -#include "src/surf/xml/platf.hpp" -#include "xbt/ex.h" /* ex_backtrace_display */ - -#include "mc/mc.h" #include "simgrid/sg_config.hpp" -#include "src/mc/mc_replay.hpp" -#include "src/surf/StorageImpl.hpp" - -#include "src/smpi/include/smpi_process.hpp" - -#include "src/kernel/activity/CommImpl.hpp" -#include "src/kernel/activity/ExecImpl.hpp" +#include "smx_private.hpp" #include "src/kernel/activity/SleepImpl.hpp" #include "src/kernel/activity/SynchroIo.hpp" #include "src/kernel/activity/SynchroRaw.hpp" +#include "src/mc/mc_record.hpp" +#include "src/mc/mc_replay.hpp" +#include "src/simix/smx_host_private.hpp" +#include "src/smpi/include/smpi_process.hpp" +#include "src/surf/StorageImpl.hpp" +#include "src/surf/xml/platf.hpp" #if SIMGRID_HAVE_MC #include "src/mc/mc_private.hpp" @@ -41,12 +24,12 @@ #include "src/mc/remote/mc_protocol.h" #endif -#include "src/mc/mc_record.hpp" - #if HAVE_SMPI #include "src/smpi/include/private.hpp" #endif +#include + XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix, "Logging specific to SIMIX (kernel)"); diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index a4ab78c2a9..7425bc3735 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -5,12 +5,11 @@ #include "mc/mc.h" #include "smx_private.hpp" -#include "src/kernel/activity/CommImpl.hpp" #include "src/mc/mc_replay.hpp" #include "src/plugins/vm/VirtualMachineImpl.hpp" +#include "src/simix/smx_host_private.hpp" #include "src/surf/surf_interface.hpp" #include "xbt/ex.hpp" -#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts"); diff --git a/src/simix/smx_host_private.hpp b/src/simix/smx_host_private.hpp index 00f681a180..9f1acbca3a 100644 --- a/src/simix/smx_host_private.hpp +++ b/src/simix/smx_host_private.hpp @@ -11,14 +11,9 @@ #include #include -#include -#include - -#include "popping_private.hpp" -#include "simgrid/simix.h" - -#include "ActorImpl.hpp" -#include "src/kernel/activity/ExecImpl.hpp" +#include "src/simix/ActorImpl.hpp" +#include "src/simix/popping_private.hpp" +#include "xbt/Extendable.hpp" /** @brief Host datatype from SIMIX POV */ namespace simgrid { diff --git a/src/simix/smx_io.cpp b/src/simix/smx_io.cpp index b0363e9d38..a9c2a2cc36 100644 --- a/src/simix/smx_io.cpp +++ b/src/simix/smx_io.cpp @@ -9,12 +9,12 @@ #include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Storage.hpp" +#include "smx_private.hpp" +#include "src/simix/smx_io_private.hpp" #include "src/surf/HostImpl.hpp" #include "src/surf/StorageImpl.hpp" -#include "surf/surf.hpp" - -#include "smx_private.hpp" #include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" #include "src/kernel/activity/SynchroIo.hpp" diff --git a/src/simix/smx_private.hpp b/src/simix/smx_private.hpp index e6cc998a0e..e220311d6e 100644 --- a/src/simix/smx_private.hpp +++ b/src/simix/smx_private.hpp @@ -8,10 +8,8 @@ #include "simgrid/s4u/Actor.hpp" #include "src/kernel/context/Context.hpp" -#include -#include -#include +#include #include /********************************** Simix Global ******************************/ diff --git a/src/simix/smx_synchro.cpp b/src/simix/smx_synchro.cpp index 76574a1ee1..96275c3fea 100644 --- a/src/simix/smx_synchro.cpp +++ b/src/simix/smx_synchro.cpp @@ -1,18 +1,14 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2018. 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. */ #include "smx_private.hpp" -#include "src/surf/cpu_interface.hpp" -#include "src/surf/surf_interface.hpp" -#include -#include -#include - #include "src/kernel/activity/MutexImpl.hpp" #include "src/kernel/activity/SynchroRaw.hpp" +#include "src/simix/smx_synchro_private.hpp" +#include "src/surf/cpu_interface.hpp" +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, "SIMIX Synchronization (mutex, semaphores and conditions)"); diff --git a/src/smpi/mpi/smpi_comm.cpp b/src/smpi/mpi/smpi_comm.cpp index 1183cacffb..b50587d170 100644 --- a/src/smpi/mpi/smpi_comm.cpp +++ b/src/smpi/mpi/smpi_comm.cpp @@ -12,7 +12,9 @@ #include "smpi_request.hpp" #include "smpi_status.hpp" #include "smpi_win.hpp" +#include "src/simix/smx_host_private.hpp" #include "src/simix/smx_private.hpp" + #include #include #include diff --git a/src/surf/HostImpl.hpp b/src/surf/HostImpl.hpp index 02b40c493e..90038c279a 100644 --- a/src/surf/HostImpl.hpp +++ b/src/surf/HostImpl.hpp @@ -3,23 +3,15 @@ /* 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. */ -#include "surf_interface.hpp" #include "cpu_interface.hpp" #include "network_interface.hpp" #include "src/surf/PropertyHolder.hpp" #include "StorageImpl.hpp" -#include #ifndef SURF_HOST_INTERFACE_HPP_ #define SURF_HOST_INTERFACE_HPP_ -/********* - * Tools * - *********/ - -XBT_PUBLIC_DATA simgrid::surf::HostModel* surf_host_model; - /********* * Model * *********/ @@ -64,4 +56,6 @@ public: } } +XBT_PUBLIC_DATA simgrid::surf::HostModel* surf_host_model; + #endif /* SURF_Host_INTERFACE_HPP_ */ diff --git a/src/surf/StorageImpl.hpp b/src/surf/StorageImpl.hpp index 5e2f7e0e81..29b98f895f 100644 --- a/src/surf/StorageImpl.hpp +++ b/src/surf/StorageImpl.hpp @@ -3,14 +3,12 @@ /* 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. */ -#include -#include - #include "simgrid/kernel/resource/Action.hpp" #include "simgrid/kernel/resource/Model.hpp" #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Storage.hpp" #include "src/surf/PropertyHolder.hpp" +#include "src/surf/trace_mgr.hpp" #include "surf_interface.hpp" #include diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 1bce074e28..2ffe199424 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -4,13 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "cpu_cas01.hpp" -#include "cpu_ti.hpp" #include "simgrid/sg_config.hpp" -#include "src/kernel/lmm/maxmin.hpp" -#include "xbt/config.hpp" -#include "xbt/utility.hpp" - -#include +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_cas, surf_cpu, "Logging specific to the SURF CPU module"); diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 21867e6631..17ba993f42 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -5,7 +5,8 @@ #include "cpu_interface.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals -#include +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_CATEGORY(surf_kernel); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, "Logging specific to the SURF cpu module"); diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 81a9cb77bc..ac6fbe8021 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -10,6 +10,7 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Host.hpp" #include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/trace_mgr.hpp" #include diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index c1c9ec471f..62b5ce5100 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -4,9 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "cpu_ti.hpp" +#include "src/surf/surf_interface.hpp" #include "src/surf/trace_mgr.hpp" -#include "xbt/utility.hpp" -#include +#include "surf/surf.hpp" #ifndef SURF_MODEL_CPUTI_H_ #define SURF_MODEL_CPUTI_H_ diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index 84127e0d1e..ba27fcb16e 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -1,17 +1,11 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2018. 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. */ -#include - -#include - #include "host_clm03.hpp" - -#include "cpu_cas01.hpp" #include "simgrid/sg_config.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 1a45b05311..27b98cbc55 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -3,13 +3,12 @@ /* 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. */ -#include - #include "network_cm02.hpp" #include "simgrid/s4u/Host.hpp" #include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals -#include "src/kernel/lmm/maxmin.hpp" +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 7dd7d45247..4c0bd88d84 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -4,6 +4,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "network_constant.hpp" +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 24258c57b5..ee9d50edb0 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -1,16 +1,14 @@ -/* Copyright (c) 2014-2018. The SimGrid Team. -*All rights reserved. */ +/* Copyright (c) 2014-2018. 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. */ -#include - +#include "src/surf/network_ib.hpp" #include "simgrid/sg_config.hpp" -#include "src/kernel/lmm/maxmin.hpp" #include "src/surf/HostImpl.hpp" -#include "src/surf/network_ib.hpp" #include "src/surf/xml/platf.hpp" +#include "surf/surf.hpp" + #include #include diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 489580819c..acfa0d1479 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -3,10 +3,9 @@ /* 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. */ -#include - #include "network_interface.hpp" #include "simgrid/sg_config.hpp" +#include "src/surf/surf_interface.hpp" #ifndef NETWORK_INTERFACE_CPP_ #define NETWORK_INTERFACE_CPP_ diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index f513f71943..5c7a00e0ab 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -11,8 +11,7 @@ #include "simgrid/s4u/Link.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/surf/PropertyHolder.hpp" -#include "src/surf/surf_interface.hpp" -#include "xbt/base.h" +#include "src/surf/trace_mgr.hpp" #include #include diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index ca3409ee26..d377157df0 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -25,8 +25,10 @@ #include "simgrid/plugins/energy.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "src/surf/xml/platf_private.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals +#include "src/surf/surf_interface.hpp" +#include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ns3, surf, "Logging specific to the SURF network NS3 module"); diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index c5b221067f..2b1c21d102 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -1,17 +1,13 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2018. 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. */ -#include -#include - -#include - #include "network_smpi.hpp" #include "simgrid/sg_config.hpp" #include "smpi_utils.hpp" +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); diff --git a/src/surf/plugins/link_energy.cpp b/src/surf/plugins/link_energy.cpp index 0cd11d5e2c..dbe5c8fe9b 100644 --- a/src/surf/plugins/link_energy.cpp +++ b/src/surf/plugins/link_energy.cpp @@ -5,14 +5,12 @@ #include "simgrid/plugins/energy.h" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/simix.hpp" #include "src/surf/network_interface.hpp" +#include "surf/surf.hpp" + #include #include -#include #include -#include -#include /** @addtogroup SURF_plugin_energy diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 0454e7a340..9e2bfe1fb1 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -3,16 +3,11 @@ /* 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. */ -#include - -#include -#include - #include "ptask_L07.hpp" - -#include "cpu_interface.hpp" +#include "surf/surf.hpp" #include "xbt/config.hpp" -#include "xbt/utility.hpp" + +#include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 10f6747be9..4c2161a5f6 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -15,13 +15,11 @@ #include "simgrid/kernel/routing/TorusZone.hpp" #include "simgrid/kernel/routing/VivaldiZone.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/s4u/Storage.hpp" #include "src/include/simgrid/sg_config.hpp" #include "src/kernel/EngineImpl.hpp" +#include "src/simix/smx_host_private.hpp" #include "src/simix/smx_private.hpp" #include "src/surf/HostImpl.hpp" -#include "src/surf/cpu_interface.hpp" -#include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" #include diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index b2059f1b74..f9e5c7a0ed 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -6,11 +6,9 @@ #include "storage_n11.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/s4u/Host.hpp" -#include "src/surf/xml/platf.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "xbt/utility.hpp" -#include /*ceil*/ +#include "src/surf/xml/platf.hpp" +#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage); diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index c1729908bc..85296a974a 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -4,20 +4,17 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "surf_interface.hpp" +#include "instr/instr_interface.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals #include "mc/mc.h" -#include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.hpp" -#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals -#include "src/kernel/lmm/maxmin.hpp" // Constraint +#include "src/internal_config.h" #include "src/surf/HostImpl.hpp" #include "src/surf/xml/platf.hpp" -#include "xbt/utility.hpp" +#include "surf/surf.hpp" #include -#include #include -#include #ifdef _WIN32 #include diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 3dd6ecaaae..a174a31062 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -6,20 +6,13 @@ #ifndef SURF_MODEL_H_ #define SURF_MODEL_H_ -#include "xbt/signal.hpp" -#include "xbt/utility.hpp" - #include "src/surf/surf_private.hpp" -#include "surf/surf.hpp" -#include "xbt/str.h" -#include -#include -#include #include #include #include #include +#include /********* * Utils * diff --git a/src/surf/surf_private.hpp b/src/surf/surf_private.hpp index aa48911231..e45589fb50 100644 --- a/src/surf/surf_private.hpp +++ b/src/surf/surf_private.hpp @@ -6,8 +6,8 @@ #ifndef SURF_SURF_PRIVATE_HPP #define SURF_SURF_PRIVATE_HPP -#include "src/surf/trace_mgr.hpp" -#include "surf/surf.hpp" +#include "simgrid/forward.h" +#include "xbt/sysdep.h" extern "C" { @@ -22,8 +22,6 @@ XBT_PRIVATE std::ifstream* surf_ifsopen(std::string name); */ XBT_PRIVATE int __surf_is_absolute_file_path(const char* file_path); -extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set* future_evt_set; - XBT_PUBLIC void storage_register_callbacks(); XBT_PRIVATE void parse_after_config(); diff --git a/src/surf/trace_mgr.hpp b/src/surf/trace_mgr.hpp index e2b411108b..5b4e174b9f 100644 --- a/src/surf/trace_mgr.hpp +++ b/src/surf/trace_mgr.hpp @@ -8,10 +8,10 @@ #include "simgrid/forward.h" #include "xbt/sysdep.h" + #include #include - /* Iterator within a trace */ namespace simgrid { namespace kernel { @@ -28,6 +28,7 @@ public: } // namespace kernel } // namespace simgrid typedef simgrid::kernel::resource::TraceEvent* tmgr_trace_event_t; +extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set* future_evt_set; /** * \brief Free a trace event structure diff --git a/src/surf/xml/surfxml_parseplatf.cpp b/src/surf/xml/surfxml_parseplatf.cpp index 30666535db..5834a8ac2d 100644 --- a/src/surf/xml/surfxml_parseplatf.cpp +++ b/src/surf/xml/surfxml_parseplatf.cpp @@ -3,14 +3,15 @@ /* 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. */ -#include "src/instr/instr_private.hpp" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals +#include "instr/instr_interface.h" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" -#include "xbt/log.h" -#include "xbt/misc.h" +#include "src/surf/surf_interface.hpp" +#include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" + #include -#include "src/surf/xml/platf_private.hpp" #if SIMGRID_HAVE_LUA #include "src/bindings/lua/simgrid_lua.hpp" diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 3388b9a03e..34ac5204aa 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -7,13 +7,14 @@ #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.hpp" #include "src/surf/network_interface.hpp" +#include "src/surf/surf_interface.hpp" +#include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" #include "xbt/file.hpp" -#include "src/surf/xml/platf_private.hpp" #include #include #include -#include #include #include #include diff --git a/teshsuite/surf/surf_usage/surf_usage.cpp b/teshsuite/surf/surf_usage/surf_usage.cpp index 412fe5aedf..27b9638e58 100644 --- a/teshsuite/surf/surf_usage/surf_usage.cpp +++ b/teshsuite/surf/surf_usage/surf_usage.cpp @@ -8,6 +8,8 @@ #include "simgrid/host.h" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" +#include "surf/surf.hpp" +#include "xbt/config.h" XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); diff --git a/teshsuite/surf/surf_usage2/surf_usage2.cpp b/teshsuite/surf/surf_usage2/surf_usage2.cpp index 1637939e73..d8a86cc720 100644 --- a/teshsuite/surf/surf_usage2/surf_usage2.cpp +++ b/teshsuite/surf/surf_usage2/surf_usage2.cpp @@ -8,6 +8,9 @@ #include "simgrid/host.h" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" +#include "src/surf/surf_interface.hpp" +#include "surf/surf.hpp" +#include "xbt/config.h" XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");