1
1
openmpi/opal/util/trace.c
Jeff Squyres 4aa75fa739 - Make opal_output_stream_t be a real opal_object_t so that it can use
a constructor, like the rest of the code base
- Convert usage in the tree to use the constructor to zero out an
  instance of opal_output_stream_t
- Still need to re-enable output files

This commit was SVN r7253.
2005-09-09 10:46:54 +00:00

51 строка
1.2 KiB
C

/* @file */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "opal/util/output.h"
#include "opal/util/trace.h"
int opal_trace_handle;
/*
* Local state
*/
static opal_output_stream_t tracer;
void opal_trace_init(void)
{
#if OPAL_ENABLE_TRACE
/* get a file setup for opal_output to use for the trace */
OBJ_CONSTRUCT(&tracer, opal_output_stream_t);
tracer.lds_file_suffix = "trace";
tracer.lds_want_file = true;
opal_trace_handle = opal_output_open(&tracer);
#endif
}
void opal_trace_finalize(void)
{
#if OPAL_ENABLE_TRACE
opal_output_close(opal_trace_handle);
OBJ_DESTRUCT(&tracer);
#endif
}