Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/logging/lib/load-log.cxx
ViewVC logotype

Diff of /branches/vis15/src/logging/lib/load-log.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4867, Sat Dec 31 16:16:34 2016 UTC revision 4868, Sat Dec 31 21:08:28 2016 UTC
# Line 109  Line 109 
109      log->_nWorkers = hdr._nWorkers;      log->_nWorkers = hdr._nWorkers;
110      log->_events.reserve (maxNumEvents);      log->_events.reserve (maxNumEvents);
111    
112      // track last timestamp per worker to detect anomolies
113        uint64_t lastTS[hdr._nWorkers];
114        for (int i = 0;  i <= hdr._nWorkers;  i++) {
115            lastTS[i] = 0;
116        }
117    
118    // read in the events    // read in the events
119      diderot::log::buffer buf;      diderot::log::buffer buf;
120      uint64_t numEvents = 0;      uint64_t numEvents = 0;
# Line 128  Line 134 
134          }          }
135          for (int j = 0;  j < buf._next;  j++, numEvents++) {          for (int j = 0;  j < buf._next;  j++, numEvents++) {
136              diderot::log::event *ep = &(buf._log[j]);              diderot::log::event *ep = &(buf._log[j]);
137              log->_events.push_back (              uint64_t ts = get_timestamp(hdr._tsKind, &(ep->_ts));
138                  event (get_timestamp(hdr._tsKind, &(ep->_ts)), worker, ep->_event, ep->_strand));              if (ts < lastTS[worker]) {
139                    std::cerr << "warning: timestamp for worker " << worker
140                        << "; event #" << j << "(=" << ep->_event << ") occurs "
141                        << lastTS[worker]-ts << "ns too early\n";
142                }
143                lastTS[worker] = ts;
144                log->_events.push_back (event (ts, worker, ep->_event, ep->_strand));
145          }          }
146      }      }
147      ins.close();      ins.close();

Legend:
Removed from v.4867  
changed lines
  Added in v.4868

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0