Ignore:
Timestamp:
Dec 16, 2015, 1:03:16 PM (9 years ago)
Author:
alain
Message:

Modify instrumentation to save results on virtual disk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/mjpeg/demux.c

    r741 r748  
    3636
    3737// macro to use a shared TTY
    38 #define PRINTF(...)    lock_acquire( &tty_lock ); \
    39                        giet_tty_printf(__VA_ARGS__);  \
    40                        lock_release( &tty_lock );
     38#define PRINTF(...)  do { lock_acquire( &tty_lock ); \
     39                          giet_tty_printf(__VA_ARGS__);  \
     40                          lock_release( &tty_lock ); } while(0);
    4141
    4242///////////////////////////////////////////////////////////
     
    8787
    8888    PRINTF("\n[MJPEG] thread DEMUX[%d] starts on P[%d,%d,%d] / trdid = %x\n",
    89            index , x , y , p, (uint32_t)trdid_demux[index] )
     89           index , x , y , p, (uint32_t)trdid_demux[index] );
    9090
    9191    // initialise BUFIO for MWMR channel <in>
     
    9797#if (DEBUG_DEMUX > 1)
    9898if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    99 { PRINTF("\nDEMUX[%d] <in> : &mwmr = %x / &bufio = %x\n",
    100          index , mwmr_in , &bufio_in ) }
     99PRINTF("\nDEMUX[%d] <in> : &mwmr = %x / &bufio = %x\n",
     100         index , mwmr_in , &bufio_in );
    101101#endif
    102102
     
    109109#if (DEBUG_DEMUX > 1)
    110110if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    111 { PRINTF("\nDEMUX[%d] : <out_quanti> : mwmr = %x / &bufio = %x\n",
    112          index , mwmr_out_quanti , &bufio_out_quanti ) }
     111PRINTF("\nDEMUX[%d] : <out_quanti> : mwmr = %x / &bufio = %x\n",
     112         index , mwmr_out_quanti , &bufio_out_quanti );
    113113#endif
    114114
     
    121121#if (DEBUG_DEMUX > 1)
    122122if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    123 { PRINTF("\nDEMUX[%d] : <out_huff> : mwmr = %x / &bufio = %x\n",
    124          index , mwmr_out_huff , &bufio_out_huff ) }
     123PRINTF("\nDEMUX[%d] : <out_huff> : mwmr = %x / &bufio = %x\n",
     124         index , mwmr_out_huff , &bufio_out_huff );
    125125#endif
    126126
     
    133133#if (DEBUG_DEMUX > 1)
    134134if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    135 { PRINTF("\nDEMUX[%d] : <out_data> : mwmr = %x / &bufio = %x\n",
    136          index , mwmr_out_data , &bufio_out_data ) }
     135PRINTF("\nDEMUX[%d] : <out_data> : mwmr = %x / &bufio = %x\n",
     136         index , mwmr_out_data , &bufio_out_data );
    137137#endif
    138138
     
    160160#if (DEBUG_DEMUX > 1)
    161161if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    162 { PRINTF("\nDEMUX[%x] found Start of Image marker\n", index ) }
     162PRINTF("\nDEMUX[%x] found Start of Image marker\n", index );
    163163#endif
    164164
     
    181181#if (DEBUG_DEMUX > 1)
    182182if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    183 { PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index ) }
     183PRINTF("\nDEMUX[%x] found Start of Frame marker\n", index );
    184184#endif
    185185                // Only one component per image is supported
     
    217217#if (DEBUG_DEMUX > 1)
    218218if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    219 { PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index ) }
     219PRINTF("\nDEMUX[%x] found Quantization Table marker\n", index );
    220220#endif
    221221                // The  quantisation table segment being fixed length,
     
    245245#if (DEBUG_DEMUX > 1)
    246246if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    247 { PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index ) }
     247PRINTF("\nDEMUX[%x] found Huffman Table marker\n", index );
    248248#endif
    249249                // The Huffman Table segment being variable length,
     
    290290#if (DEBUG_DEMUX > 1)
    291291if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    292 { PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index ) }
     292PRINTF("\nDEMUX[%x] found Start of Scan marker\n", index );
    293293#endif
    294294                // The scan segment has a variable length:
     
    342342#if (DEBUG_DEMUX > 1)
    343343if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    344 { PRINTF("\nDEMUX[%x] found End of Image marker\n", index ) }
     344PRINTF("\nDEMUX[%x] found End of Image marker\n", index );
    345345#endif
    346346                mwmr_bufio_flush( &bufio_out_data );
     
    354354#if (DEBUG_DEMUX > 1)
    355355if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    356 { PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index ) }
     356PRINTF("\nDEMUX[%x] found Comment or Application marker\n", index );
    357357#endif
    358358                // read segment length from bufio_in
     
    381381#if DEBUG_DEMUX
    382382if ( (index == DEBUG_CLUSTER_INDEX) || (DEBUG_CLUSTER_INDEX == 0XFFFFFFFF) )
    383 { PRINTF("\nDEMUX[%d] completes image %d at cycle %d\n", index , image , giet_proctime() ) }
     383PRINTF("\nDEMUX[%d] completes image %d at cycle %d\n", index , image , giet_proctime() );
    384384#endif
    385385        image = image + x_size * y_size;
Note: See TracChangeset for help on using the changeset viewer.