A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'clean_events' of github.com:Takishipp/simgrid into clean_events
[simgrid.git]
/
src
/
instr
/
instr_paje_trace.cpp
diff --git
a/src/instr/instr_paje_trace.cpp
b/src/instr/instr_paje_trace.cpp
index
5cabc10
..
2676cd1
100644
(file)
--- a/
src/instr/instr_paje_trace.cpp
+++ b/
src/instr/instr_paje_trace.cpp
@@
-120,9
+120,9
@@
static void print_timestamp(PajeEvent* event) {
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (event->timestamp < 1e-12)
stream << 0;
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (event->timestamp < 1e-12)
stream << 0;
- else
+ else
stream << event->timestamp;
stream << event->timestamp;
-}
+}
/* internal do the instrumentation module */
static void insert_into_buffer (PajeEvent* tbi)
/* internal do the instrumentation module */
static void insert_into_buffer (PajeEvent* tbi)
@@
-214,14
+214,12
@@
void TRACE_paje_end() {
void DefineContainerEvent(type_t type)
{
void DefineContainerEvent(type_t type)
{
- e_event_type event_type = PAJE_DefineContainerType;
- double timestamp = 0;
- XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type);
+ XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineContainerType);
//print it
if (instr_fmt_type == instr_fmt_paje) {
//print it
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
(int)event_type, TRACE_precision(), timestamp
);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
PAJE_DefineContainerType, TRACE_precision(), 0.
);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_t
ype;
+ stream <<
PAJE_DefineContainerT
ype;
stream << " " << type->id
<< " " << type->father->id
<< " " << type->name;
stream << " " << type->id
<< " " << type->father->id
<< " " << type->name;
@@
-236,18
+234,16
@@
void DefineContainerEvent(type_t type)
-void
DefineVariableTypeEvent
(type_t type)
+void
LogVariableTypeDefinition
(type_t type)
{
{
- e_event_type event_type = PAJE_DefineVariableType;
- double timestamp = 0;
- XBT_DEBUG("%s: event_type=%d", __FUNCTION__,
(int)event_t
ype);
+ XBT_DEBUG("%s: event_type=%d", __FUNCTION__,
PAJE_DefineVariableT
ype);
//print it
if (instr_fmt_type == instr_fmt_paje) {
//print it
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
(int)event_type, TRACE_precision(), timestamp
);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
PAJE_DefineVariableType, TRACE_precision(), 0.
);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_t
ype;
+ stream <<
PAJE_DefineVariableT
ype;
stream << " " << type->id << " " << type->father->id << " " << type->name;
if (type->color)
stream << " \"" << type->color << "\"";
stream << " " << type->id << " " << type->father->id << " " << type->name;
if (type->color)
stream << " \"" << type->color << "\"";
@@
-260,18
+256,13
@@
if (instr_fmt_type == instr_fmt_paje) {
}
}
-void
DefineStateTypeEvent
(type_t type)
+void
LogStateTypeDefinition
(type_t type)
{
{
- e_event_type event_type = PAJE_DefineStateType;
- double timestamp = 0;
-
- XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type);
-
//print it
if (instr_fmt_type == instr_fmt_paje) {
//print it
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
(int)event_type, TRACE_precision(), timestamp
);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
PAJE_DefineStateType, TRACE_precision(), 0.
);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_t
ype;
+ stream <<
PAJE_DefineStateT
ype;
stream << " " << type->id << " " << type->father->id << " " << type->name;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
stream << " " << type->id << " " << type->father->id << " " << type->name;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
@@
-309,18
+300,14
@@
void DefineEventTypeEvent::print() {
}
}
}
}
-void
DefineLinkTypeEvent
(type_t type, type_t source, type_t dest)
+void
LogLinkTypeDefinition
(type_t type, type_t source, type_t dest)
{
{
- e_event_type event_type = PAJE_DefineLinkType;
- double timestamp = 0;
-
- XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type);
-
+ XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineLinkType);
//print it
if (instr_fmt_type == instr_fmt_paje) {
//print it
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
(int)event_type, TRACE_precision(), timestamp
);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__,
PAJE_DefineLinkType, TRACE_precision(), 0.
);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_t
ype;
+ stream <<
PAJE_DefineLinkT
ype;
stream << " " << type->id << " " << type->father->id << " " << source->id << " " << dest->id << " " << type->name;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
stream << " " << type->id << " " << type->father->id << " " << source->id << " " << dest->id << " " << type->name;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
@@
-330,18
+317,13
@@
if (instr_fmt_type == instr_fmt_paje) {
}
}
}
}
-void
DefineEntityValueEvent
(val_t value)
+void
LogEntityValue
(val_t value)
{
{
- e_event_type event_type = PAJE_DefineEntityValue;
- double timestamp = 0;
-
- XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type);
-
+ XBT_DEBUG("%s: event_type=%d", __FUNCTION__, PAJE_DefineEntityValue);
//print it
if (instr_fmt_type == instr_fmt_paje) {
//print it
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_typ
e;
+ stream <<
PAJE_DefineEntityValu
e;
stream << " " << value->id << " " << value->father->id << " " << value->name;
if (value->color)
stream << " \"" << value->color << "\"";
stream << " " << value->id << " " << value->father->id << " " << value->name;
if (value->color)
stream << " \"" << value->color << "\"";
@@
-354,17
+336,15
@@
if (instr_fmt_type == instr_fmt_paje) {
}
}
-void
CreateContainerEvent
(container_t container)
+void
LogContainerCreation
(container_t container)
{
{
- e_event_type event_type = PAJE_CreateContainer;
double timestamp = SIMIX_get_clock();
double timestamp = SIMIX_get_clock();
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__,
(int)event_type
,timestamp);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__,
PAJE_CreateContainer
,timestamp);
if (instr_fmt_type == instr_fmt_paje) {
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_type
;
+ stream <<
PAJE_CreateContainer
;
stream << " ";
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (timestamp < 1e-12)
stream << " ";
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (timestamp < 1e-12)
@@
-407,17
+387,15
@@
if (instr_fmt_type == instr_fmt_paje) {
}
}
}
}
-void
DestroyContainerEvent
(container_t container)
+void
LogContainerDestruction
(container_t container)
{
{
- e_event_type event_type = PAJE_DestroyContainer;
double timestamp = SIMIX_get_clock();
double timestamp = SIMIX_get_clock();
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__,
(int)event_type
, timestamp);
+ XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__,
PAJE_DestroyContainer
, timestamp);
if (instr_fmt_type == instr_fmt_paje) {
if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << std::fixed << std::setprecision(TRACE_precision());
- stream <<
(int)event_type
;
+ stream <<
PAJE_DestroyContainer
;
stream << " ";
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (timestamp < 1e-12)
stream << " ";
/* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
if (timestamp < 1e-12)