Commits (1)
......@@ -40,9 +40,6 @@ void __po_hi_instrumentation_vcd_init (void);
#define __PO_HI_INSTRUMENTATION_VCD_WRITE(s, args...) \
{ \
extern enum tagVCD VCD_state; \
if (VCD_state == VCD_UNCHECKED) { \
VCD_state = NULL == getenv("VCD_ENABLED")?VCD_DISABLED:VCD_ENABLED; \
} \
if (VCD_state == VCD_ENABLED) { \
extern int __po_hi_vcd_file; \
extern __po_hi_time_t __po_hi_vcd_start_time; \
......
......@@ -21,7 +21,7 @@
#include <stdlib.h>
#if defined(__PO_HI_USE_VCD) && defined(__unix__)
enum tagVCD VCD_state;
enum tagVCD VCD_state = VCD_UNCHECKED;
#endif
int __po_hi_compute_miss (__po_hi_uint8_t rate)
......@@ -90,6 +90,18 @@ void __po_hi_instrumentation_vcd_init ()
int size_to_write = 0;
time_t current_time;
#if defined(__PO_HI_USE_VCD) && defined(__unix__)
if (VCD_state == VCD_UNCHECKED)
{
VCD_state = NULL == getenv("VCD_ENABLED")?VCD_DISABLED:VCD_ENABLED;
}
if (VCD_state != VCD_ENABLED)
{
return;
}
#endif
if (__po_hi_vcd_init == 0)
{
__po_hi_vcd_init = 1;
......