Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: dbf20923f401cd993a4d9f7ce6989b0d0420d55e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[module traceOTF('http://www.eclipse.org/uml2/4.0.0/UML')/]

[import org::eclipse::papyrus::qompass::designer::core::acceleo::UMLTool/]
[import org::eclipse::papyrus::qompass::designer::core::acceleo::utils_cpp/]

[template public traceOp(operation: Operation)]

// <instance>_<port>_<operation>
// easier: <component>_<port>_<operation>
updateTimestamp ();
if (!hasDeclaredFunctions) {
	declareFunctions();
	hasDeclaredFunctions = true;
}
Tracing::TraceInit::wait();
int processID = Tracing::TraceInit::getProcessID();
OTF_Writer * writer = Tracing::TraceInit::getWriter();
OTF_Writer_writeEnter (writer, timestamp.ticks(), <%enumSvcPrefix%>::id_<%owner.varName%>_<%varName%>, processID, 0);
OTF_Writer_writeEventComment (writer, timestamp.ticks(), processID, portName);
OTF_Writer_writeEventComment (writer, timestamp.ticks(), processID, instanceName);
Tracing::TraceInit::post();
[if not (type = null)] [type.cppType()/] ret = [/if]rconn->[operation.cppCall()/];
updateTimestamp ();
Tracing::TraceInit::wait();
OTF_Writer_writeLeave (writer, timestamp.ticks(), <%enumSvcPrefix%>::id_<%owner.varName%>_<%varName%>, processID, 0);
Tracing::TraceInit::post();
[if not (type = null)] return ret;[/if]
[/template]

Back to the top