SST/macro
event_trace.h
Go to the documentation of this file.
1 /*
2  * This file is part of SST/macroscale:
3  * The macroscale architecture simulator from the SST suite.
4  * Copyright (c) 2009 Sandia Corporation.
5  * This software is distributed under the BSD License.
6  * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7  * the U.S. Government retains certain rights in this software.
8  * For more information, see the LICENSE file in the top
9  * SST/macroscale directory.
10  */
11 
12 #ifndef SSTMAC_COMMON_STATS_EVENT_TRACE_H_
13 #define SSTMAC_COMMON_STATS_EVENT_TRACE_H_
14 
17 
18 namespace sstmac {
19 
20 class event_trace :
21  public stat_collector
22 {
23 
24  public:
26  start_(-1), stop_(-1) {
27  }
28 
29  virtual void
31 
32  void
33  collect(int key_typeid,
34  const std::string& name,
35  node_id addr,
36  long threadid,
37  int aid, int tid,
38  long ticks_begin,
39  long num_ticks);
40 
41  void
42  reduce(stat_collector *coll);
43 
44  void
46 
47  void
49 
50  void
52 
53  void
54  init_factory_params(sprockit::sim_parameters *params);
55 
56  void
57  clear();
58 
59  virtual
61  }
62 
64  clone() const {
65  return clone_me(-1);
66  }
67 
69  clone_me(int id) const {
70  event_trace* cln = new event_trace;
71  cln->set_id(id);
72  clone_into(cln);
73  return cln;
74  }
75 
76  protected:
77  void
78  clone_into(event_trace *cln) const;
79 
80  protected:
81  long start_;
82  long stop_;
83 
84 };
85 
86 }
87 
88 #endif /* EVENT_TRACE_H_ */
89 
void global_reduce(parallel_runtime *rt)
void dump_global_data()
After post-processing, this notifies the collector to dump data to a file.
A type of logger that collects some kind of statistic and outputs to a file during or at the end of a...
virtual void set_id(int id)
event_trace * clone_me(int id) const
Definition: event_trace.h:69
virtual void simulation_finished(timestamp end)
This is to notify that the statistics collector is done.
A basic container for time (subject to future transplant).
Definition: timestamp.h:29
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual ~event_trace()
Definition: event_trace.h:60
void reduce(stat_collector *coll)
void init_factory_params(sprockit::sim_parameters *params)
void dump_local_data()
After post-processing, this notifies the collector to dump data to a file.
void collect(int key_typeid, const std::string &name, node_id addr, long threadid, int aid, int tid, long ticks_begin, long num_ticks)
stat_collector * clone() const
Definition: event_trace.h:64
endpoint_id node_id
Definition: node_address.h:20
void clone_into(event_trace *cln) const