sonar.issue.ignore.multicriteria.c4.ruleKey=c:PPMacroName
sonar.issue.ignore.multicriteria.c4.resourceKey=include/smpi/smpi_extended_traces.h
+
+
# Exclude some files from the analysis:
# - our unit tests
# - the tests that we borrowed elsewhere (MPICH and ISP)
# - Flex-generated files
# - Collectives that we borrowed elsewhere (mpich, openMPI and other implems)
# - the NAS, that are included in our examples
-sonar.exclusions=src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/isp/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/smpi/colls/*,examples/smpi/NAS/*
+# - RngStream, that is included in SimGrid
+sonar.exclusions=src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/isp/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/smpi/colls/*,examples/smpi/NAS/*,src/xbt/RngStream.c,include/xbt/RngStream.h
+
+# Exclude our examples from the duplication detection.
+# Examples are expected to be somehow repetitive
+sonar.cpd.exclusions=examples/**
# Ignore some files based on regex on their content (not working)
#sonar.issue.ignore.allfile=flexGenerated,flexMLGenerated
sonar.sourceEncoding=UTF-8
sonar.java.source=7
+sonar.c.std=gnu11
+sonar.cpp.std=gnu++11
# Talk to me (travis don't like it, it's too much)
# sonar.verbose=true
MSG_launch_application(deploymentFile);
}
-SG_END_DECL()
-
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
sg_host_energy_plugin_init();
}
+SG_END_DECL()
+
/** Run a Java org.simgrid.msg.Process
*
* If needed, this waits for the process starting time.
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jmethodID jas_method_As_constructor;
static jfieldID jas_field_As_bind;
xbt_dynar_free(&table);
return jtable;
}
+
+SG_END_DECL()
#include <simgrid/msg.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jfieldID jcomm_field_Comm_bind;
static jfieldID jcomm_field_Comm_finished;
static jfieldID jcomm_field_Comm_receiving;
xbt_dynar_free(&dyn);
return rank;
}
+
+SG_END_DECL()
#include "jmsg_file.h"
#include "jxbt_utilities.h"
+SG_BEGIN_DECL()
+
void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd) {
env->SetLongField(jfile, jfile_field_bind, reinterpret_cast<std::intptr_t>(fd));
}
MSG_file_close(file);
jfile_bind(env, jfile, nullptr);
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jmethodID jhost_method_Host_constructor;
static jfieldID jhost_field_Host_bind;
static jfieldID jhost_field_Host_name;
msg_host_t host = jhost_get_native(env, jhost);
return MSG_host_get_power_peak_at(host, pstate);
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
-extern "C" {
+SG_BEGIN_DECL()
jfieldID jprocess_field_Process_bind;
jfieldID jprocess_field_Process_host;
return (jint) MSG_process_get_number();
}
-} // extern C
+SG_END_DECL()
#include "jmsg_rngstream.h"
#include "jxbt_utilities.h"
+SG_BEGIN_DECL()
+
jfieldID jrngstream_bind;
RngStream jrngstream_to_native(JNIEnv *env, jobject jrngstream) {
return (jint)RngStream_RandInt(rngstream, (int)i, (int)j);
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jmethodID jstorage_method_Storage_constructor;
static jfieldID jstorage_field_Storage_bind;
static jfieldID jstorage_field_Storage_name;
xbt_dynar_free(&table);
return jtable;
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jfieldID jsynchro_field_Mutex_bind;
JNIEXPORT void JNICALL Java_org_simgrid_msg_Mutex_nativeInit(JNIEnv *env, jclass cls) {
sem = (msg_sem_t)(uintptr_t)env->GetLongField(obj, jsynchro_field_Semaphore_bind);
MSG_sem_destroy(sem);
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jmethodID jtask_method_Comm_constructor;
static jfieldID jtask_field_Task_bind;
return (jint) rv;
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
+SG_BEGIN_DECL()
+
static jfieldID jvm_field_bind;
void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm)
MSG_vm_resume(vm);
}
+SG_END_DECL()
// Define a new category
XBT_LOG_NEW_DEFAULT_CATEGORY (jtrace, "TRACE for Java(TM)");
+SG_BEGIN_DECL()
+
JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclare(JNIEnv * env, jclass cls, jstring js)
{
const char *s = env->GetStringUTFChars(js, 0);
JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcdstVariableAddWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
*/
+
+SG_END_DECL()
#include "xbt/str.h"
#include "jxbt_utilities.h"
+SG_BEGIN_DECL()
+
jclass jxbt_get_class(JNIEnv * env, const char *name)
{
jclass cls = env->FindClass(name);
{
jxbt_throw_by_name(env, "org/simgrid/msg/TaskCancelledException", details);
}
+
+SG_END_DECL()
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
+SG_BEGIN_DECL()
+
void MSG_action_init()
{
_xbt_replay_action_init();
return res;
}
+
+SG_END_DECL()
#include "src/msg/msg_private.h"
+SG_BEGIN_DECL()
+
/** \ingroup msg_simulation
* \brief An application deployer.
*
{
SIMIX_process_set_function(host_id, function_name, arguments, -1, -1);
}
+
+SG_END_DECL()
#include <lualib.h>
#endif
+SG_BEGIN_DECL()
+
/********************************* MSG **************************************/
/** \ingroup msg_simulation
{
return netzone->hosts();
}
+
+SG_END_DECL()
XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)");
+SG_BEGIN_DECL()
+
MSG_Global_t msg_global = nullptr;
static void MSG_exit();
{
return msg_global->sent_msg;
}
+
+SG_END_DECL()
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, "Logging specific to MSG (gos)");
+SG_BEGIN_DECL()
+
/** \ingroup msg_task_usage
* \brief Executes a task and waits for its termination.
*
{
return task->category;
}
+
+SG_END_DECL()
simgrid::xbt::Extension<simgrid::s4u::Host, simgrid::MsgHostExt> simgrid::MsgHostExt::EXTENSION_ID;
+SG_BEGIN_DECL()
+
int sg_storage_max_file_descriptors = 1024;
/** @addtogroup m_host_management
xbt_dict_free(&storage_list);
return contents;
}
+
+SG_END_DECL()
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_io, msg, "Logging specific to MSG (io)");
+SG_BEGIN_DECL()
+
/** @addtogroup msg_file
* (#msg_file_t) and the functions for managing it.
*
msg_storage_priv_t priv = MSG_storage_priv(storage);
return priv->hostname;
}
+
+SG_END_DECL()
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg, "Logging specific to MSG (mailbox)");
+SG_BEGIN_DECL()
+
/** \ingroup msg_mailbox_management
* \brief Set the mailbox to receive in asynchronous mode
*
XBT_VERB("%s mailbox set to receive eagerly for myself\n",alias);
}
+SG_END_DECL()
void_f_pvoid_t process_data_cleanup;
} s_MSG_Global_t, *MSG_Global_t;
+SG_BEGIN_DECL()
+
XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
/*************************************************************/
-SG_BEGIN_DECL()
XBT_PRIVATE msg_host_t __MSG_host_create(sg_host_t host);
XBT_PRIVATE msg_storage_t __MSG_storage_create(smx_storage_t storage);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)");
+SG_BEGIN_DECL()
+
/** @addtogroup m_process_management
*
* Processes (#msg_process_t) are independent agents that can do stuff on their own. They are in charge of executing
return res;
}
+SG_END_DECL()
+
msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data, msg_host_t host,
xbt_dict_t properties)
{
return process;
}
+SG_BEGIN_DECL()
+
/* Become a process in the simulation
*
* Currently this can only be called by the main thread (once) and only work with some thread factories
XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process) {
return simcall_process_restart(process);
}
+
+SG_END_DECL()
#include "msg_private.h"
#include "src/simix/smx_private.h"
+SG_BEGIN_DECL()
+
/** @addtogroup m_task_management
*
* Since most scheduling algorithms rely on a concept of task that can be either <em>computed</em> locally or
if (task->simdata->compute)
simcall_execution_set_bound(task->simdata->compute, task->simdata->bound);
}
+
+SG_END_DECL()
#include "simgrid/host.h"
#include "simgrid/simix.hpp"
+SG_BEGIN_DECL()
+
struct dirty_page {
double prev_clock;
double prev_remaining;
simgrid::simix::kernelImmediate(
[vm, bound]() { static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->setBound(bound); });
}
+
+SG_END_DECL()
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
+SG_BEGIN_DECL()
+
/*
* Allow the cluster tag to mess with the parsing buffer.
* (this will probably become obsolete once the cluster tag do not mess with the parsing callbacks directly)
if (parse_status)
surf_parse_error("Parse error in %s", file);
-
}
-
-
}
+
+SG_END_DECL()
#include "src/surf/xml/platf_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf, "Logging specific to the SURF parsing module");
-#undef CLEANUP
+
+SG_BEGIN_DECL()
+
int ETag_surfxml_include_state();
#include "simgrid_dtd.c"
}
int_f_void_t surf_parse = _surf_parse;
+
+SG_END_DECL()