Skip to content

Commit

Permalink
Updated tracing for source commit to public. #1
Browse files Browse the repository at this point in the history
  • Loading branch information
cortlandstarrett committed Dec 14, 2012
1 parent f236132 commit f63bd7e
Show file tree
Hide file tree
Showing 33 changed files with 78 additions and 194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/ttt&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="MGLS_ATTR_DISPLAY" value="_3432"/>
<mapEntry key="MGLS_ATTR_DISPLAY" value="_508"/>
</mapAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/ttt}/mcout.txt"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
Expand Down
5 changes: 1 addition & 4 deletions VandMC_testing/ttt/gen/domain.mark
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.invoke MarkInitializationFunction( "c1", "test" )
.select many te_cs from instances of TE_C
.for each te_c in te_cs
.assign te_c.MessageTrace = true
.end for
.invoke MarkMessageTracingOn( "*", "*", "*" )
.//============================================================================
.// File: domain.mark
.//
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/gen/system.mark
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.invoke MarkSystemConfigurationPackage( "system" )
.invoke EnableTasking( "POSIX", "", 4 )
.//.invoke EnableTasking( "POSIX", "", 4 )
.invoke TagDynamicMemoryAllocationOn( 10 )
.//============================================================================
.// File: system.mark
Expand Down
9 changes: 4 additions & 5 deletions VandMC_testing/ttt/mcout.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Thu Dec 6 10:39:19 2012
Fri Dec 14 09:49:04 2012
xtumlmc_build -home C:/MentorGraphics/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_3.6.3/ -l3s -e -d code_generation -O ../../src/
Upgrading translation workspace: code_generation
NOTE: Domain code 0 allocated for this import.
NOTE: The domain code you have entered has already been used/allocated, but will allow this import to proceed normally.
m.system.arc: 27: INFO: EnableTasking( POSIX, , 4 )
q.mc_metamodel.populate.arc: 362: INFO: Marked configuration package system found.
m.domain.arc: 97: INFO: Function test marked as initialization function.
m.domain.arc: 227: INFO: Message tracing enabled for *::*::*.
m.domain.arc: 173: INFO: Enabling state transition tracing for component(s) *.
m.domain.arc: 200: INFO: Action statement tracing enabled for component c1.
m.domain.arc: 200: INFO: Action statement tracing enabled for component c2.
m.domain.arc: 200: INFO: Action statement tracing enabled for component c3.
m.domain.arc: 213: INFO: Enabling detection of empty handles for component(s) *.
m.domain.arc: 240: INFO: Enabling detection of empty handles for component(s) *.
sys.arc: 151: INFO: System level marking complete.
q.domain.analyze.arc: 23: INFO: Analyzing model and making optimizations....
q.domain.analyze.arc: 48: INFO: Nonself queue is needed.
Expand Down Expand Up @@ -43,7 +43,6 @@ q.components.arc: 38: INFO: File '_ch/c3.h' CREATED.
q.components.arc: 92: INFO: File '_ch/c3_classes.h' CREATED.
q.components.arc: 99: INFO: File '_ch/c3.c' CREATED.
sys.arc: 251: INFO: File '_ch/ttt_sys_main.c' CREATED.
sys.arc: 289: INFO: File '_ch/sys_thread.c' CREATED.
sys.arc: 312: INFO: File '_ch/sys_xtuml.h' CREATED.
sys.arc: 319: INFO: File '_ch/sys_xtuml.c' CREATED.
sys.arc: 352: INFO: File '_ch/ttt_sys_types.h' CREATED.
Expand All @@ -52,4 +51,4 @@ sys.arc: 364: INFO: File '_ch/sys_user_co.c' CREATED.
sys.arc: 370: INFO: File '_ch/TIM_bridge.h' CREATED.
sys.arc: 376: INFO: File '_ch/TIM_bridge.c' CREATED.
Code generation complete.
Thu Dec 6 10:39:23 2012
Fri Dec 14 09:49:07 2012
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/ARCH_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/ARCH_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef ARCH_BRIDGE_H
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/LOG_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Logging (LOG)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/LOG_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Logging (LOG)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef LOG_BRIDGE_H
Expand Down
61 changes: 1 addition & 60 deletions VandMC_testing/ttt/src/TIM_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* asynchronously based upon the duration of the next most pending
* timer.
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*-------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand Down Expand Up @@ -381,9 +381,6 @@ timer_start(
)
{
ETimer_t * t;
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_lock( SEMAPHORE_FLAVOR_TIMER );
#endif
t = inanimate;
if ( t != 0 ) {
inanimate = inanimate->next;
Expand All @@ -396,10 +393,6 @@ timer_start(
t->expiration = ETimer_msec_time() + duration + 1UL;
timer_insert_sorted( t );
}
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_unlock( SEMAPHORE_FLAVOR_TIMER );
Escher_nonbusy_wake( 0 ); /* Wake default task to service timers. */
#endif
return ( t );
}

Expand Down Expand Up @@ -482,14 +475,8 @@ timer_cancel(
)
{
bool rc; Escher_xtUMLEvent_t * e;
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_lock( SEMAPHORE_FLAVOR_TIMER );
#endif
rc = timer_find_and_delete( t );
e = t->event;
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_unlock( SEMAPHORE_FLAVOR_TIMER );
#endif
if ( true == rc ) {
if ( 0 != e ) {
Escher_DeletextUMLEvent( e );
Expand Down Expand Up @@ -541,46 +528,6 @@ ETimer_msec_time( void )



/*=====================================================================
* Return remaining duration in timespec format.
*===================================================================*/
void *
TIM_duration_until_next_timer_pop( void * ts_in )
{
struct timespec * ts = ( struct timespec * ) ts_in;
#if ESCHER_SYS_MAX_XTUML_TIMERS > 0
ETimer_time_t t = 0UL;
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_lock( SEMAPHORE_FLAVOR_TIMER );
#endif
if ( animate != 0 ) {
t = animate->expiration;
}
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_unlock( SEMAPHORE_FLAVOR_TIMER );
#endif
if ( t == 0 ) {
ts = 0; /* Return zero to indicate no timers ticking. */
} else {
ETimer_time_t tnow = ETimer_msec_time();
ts->tv_sec = systyme.time; /* Load current time. */
ts->tv_nsec = systyme.millitm; /* Stay milliseconds for now. */
if ( t > tnow ) {
t -= tnow;
ts->tv_sec += t / 1000; /* Add the interval. */
ts->tv_nsec += t % 1000;
if ( ts->tv_nsec >= 1000 ) {
ts->tv_sec++; ts->tv_nsec -= 1000;
}
}
ts->tv_nsec *= 1000; /* Now convert to nanoseconds. */
}
#else
ts = 0; /* Return zero to indicate no timers (ticking). */
#endif /* if ESCHER_SYS_MAX_XTUML_TIMERS > 0 */
return ts;
}

/*---------------------------------------------------------------------
* Initialize the tick mechanism and the timer instances.
*-------------------------------------------------------------------*/
Expand Down Expand Up @@ -616,17 +563,11 @@ TIM_tick( void )
/*-----------------------------------------------------------------*/
/* Check to see if there are timers in the ticking timers list. */
/*-----------------------------------------------------------------*/
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_lock( SEMAPHORE_FLAVOR_TIMER );
#endif
if ( animate != 0 ) {
if ( animate->expiration <= ETimer_msec_time() ) {
timer_fire( animate );
}
}
#ifdef ESCHER_TASKING_POSIX
Escher_mutex_unlock( SEMAPHORE_FLAVOR_TIMER );
#endif
#endif /* if ESCHER_SYS_MAX_XTUML_TIMERS > 0 */
}

Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/TIM_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* indeterminate) delay between the expiration of a timer and the delivery
* of the associated event to the receiving state machine.
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef TIM_BRIDGE_H
Expand Down
22 changes: 11 additions & 11 deletions VandMC_testing/ttt/src/c1.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* UML Component Port Messages
* Component/Module Name: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand All @@ -22,7 +22,7 @@
void
c1_catch_s1( const i_t p_sp1)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 0, 0, p_sp1 );
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 0, 0, p_sp1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN]; c1_PONG * pong=0;
/* ASSIGN s = 'tic catch' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic catch'" );
Expand Down Expand Up @@ -65,7 +65,7 @@ COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 0, 0, p_sp1 );
void
c1_catch_s2()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 0, 1 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 0, 1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN]; i_t r;
/* ASSIGN s = 'tic catch s2' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic catch s2'" );
Expand All @@ -83,7 +83,7 @@ COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 0, 1 );
i_t
c1_burn_o2( const i_t p_op2)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 1, 0, p_op2 );
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 1, 0, p_op2 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic burn' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic burn'" );
Expand Down Expand Up @@ -116,7 +116,7 @@ COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 1, 0, p_op2 );
void
c1_burn_o3()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 1 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 1 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic burn o3' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic burn o3'" );
Expand All @@ -134,7 +134,7 @@ COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 1 );
i_t
c1_burn_o4()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 2 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 2 );
c_t s[ESCHER_SYS_MAX_STRING_LEN];
/* ASSIGN s = 'tic.burn::o4' */
XTUML_OAL_STMT_TRACE( 1, "ASSIGN s = 'tic.burn::o4'" );
Expand All @@ -152,7 +152,7 @@ COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 1, 2 );
void
c1_toss_s1( const i_t p_sp1)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 2, 0, p_sp1 );
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 2, 0, p_sp1 );
c2_catch_s1( p_sp1 );
}

Expand All @@ -164,7 +164,7 @@ COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 2, 0, p_sp1 );
void
c1_toss_s2()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 2, 1 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 2, 1 );
c2_catch_s2();
}

Expand All @@ -176,7 +176,7 @@ COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 2, 1 );
i_t
c1_lase_o2( const i_t p_op2)
{
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 3, 0, p_op2 );
COMP_MSG_START_TRACE( "%d", c1_DOMAIN_ID, 3, 0, p_op2 );
return c3_burn_o2( p_op2 );
}

Expand All @@ -188,7 +188,7 @@ return c3_burn_o2( p_op2 );
void
c1_lase_o3()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 1 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 1 );
c3_burn_o3();
}

Expand All @@ -200,7 +200,7 @@ COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 1 );
i_t
c1_lase_o4()
{
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 2 );
COMP_MSG_START_TRACE( "", c1_DOMAIN_ID, 3, 2 );
return c3_burn_o4();
}

Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* UML Component (Module) Declaration (Operations and Signals)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef C1_H
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1_PING_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Class: ping (PING)
* Component: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1_PING_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Class: ping (PING)
* Component: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef C1_PING_CLASS_H
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1_PONG_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Class: pong (PONG)
* Component: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#include "ttt_sys_types.h"
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1_PONG_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Class: pong (PONG)
* Component: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef C1_PONG_CLASS_H
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/ttt/src/c1_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file defines the object type identification numbers for all classes
* in the component: c1
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
*
*--------------------------------------------------------------------------*/

#ifndef C1_CLASSES_H
Expand Down
Loading

0 comments on commit f63bd7e

Please sign in to comment.