hotspot/src/share/vm/utilities/events.cpp
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1 489c9b5090e2
child 5547 f4b087cbb361
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
#include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
#include "incls/_events.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
////////////////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
// Event
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
typedef u4 EventID;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class Event VALUE_OBJ_CLASS_SPEC  {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  jlong       _time_tick;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  intx        _thread_id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  const char* _format;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  int         _indent;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  intptr_t    _arg_1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  intptr_t    _arg_2;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  intptr_t    _arg_3;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  // only EventBuffer::add_event() can assign event id
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  friend class EventBuffer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  EventID     _id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  void clear() { _format = NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  EventID id() const { return _id; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  void fill(int indent, const char* format, intptr_t arg_1, intptr_t arg_2, intptr_t arg_3) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    _format = format;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    _arg_1  = arg_1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    _arg_2  = arg_2;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    _arg_3  = arg_3;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    _indent = indent;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    _thread_id = os::current_thread_id();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    _time_tick = os::elapsed_counter();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  void print_on(outputStream *st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    if (_format == NULL) return;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    st->print("  %d", _thread_id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
    st->print("  %3.2g   ", (double)_time_tick / os::elapsed_frequency());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    st->fill_to(20);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    for (int index = 0; index < _indent; index++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
      st->print("| ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
    st->print_cr(_format, _arg_1, _arg_2, _arg_3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
////////////////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
// EventBuffer
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
// Simple lock-free event queue. Every event has a unique 32-bit id.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
// It's fine if two threads add events at the same time, because they
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
// will get different event id, and then write to different buffer location.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
// However, it is assumed that add_event() is quick enough (or buffer size
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
// is big enough), so when one thread is adding event, there can't be more
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
// than "size" events created by other threads; otherwise we'll end up having
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
// two threads writing to the same location.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
class EventBuffer : AllStatic {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  static Event* buffer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  static int    size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  static jint   indent;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  static volatile EventID _current_event_id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  static EventID get_next_event_id() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    return (EventID)Atomic::add(1, (jint*)&_current_event_id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  static void inc_indent() { Atomic::inc(&indent); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  static void dec_indent() { Atomic::dec(&indent); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  static bool get_event(EventID id, Event* event) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    int index = (int)(id % size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    if (buffer[index].id() == id) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
      memcpy(event, &buffer[index], sizeof(Event));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
      // check id again; if buffer[index] is being updated by another thread,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
      // event->id() will contain different value.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
      return (event->id() == id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
      // id does not match - id is invalid, or event is overwritten
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
      return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  // add a new event to the queue; if EventBuffer is full, this call will
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // overwrite the oldest event in the queue
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  static EventID add_event(const char* format,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
                           intptr_t arg_1, intptr_t arg_2, intptr_t arg_3) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
    // assign a unique id
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    EventID id = get_next_event_id();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
    // event will be copied to buffer[index]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
    int index = (int)(id % size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    // first, invalidate id, buffer[index] can't have event with id = index + 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
    buffer[index]._id = index + 2;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
    // make sure everyone has seen that buffer[index] is invalid
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
    OrderAccess::fence();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    // ... before updating its value
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
    buffer[index].fill(indent, format, arg_1, arg_2, arg_3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    // finally, set up real event id, now buffer[index] contains valid event
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
    OrderAccess::release_store(&(buffer[index]._id), id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    return id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  static void print_last(outputStream *st, int number) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
    st->print_cr("[Last %d events in the event buffer]", number);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    st->print_cr("-<thd>-<elapsed sec>-<description>---------------------");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
    int count = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    EventID id = _current_event_id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
    while (count < number) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
      Event event;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
      if (get_event(id, &event)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
         event.print_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
      id--;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
      count++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  static void print_all(outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
    print_last(st, size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  static void init() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
    // Allocate the event buffer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
    size   = EventLogLength;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
    buffer = NEW_C_HEAP_ARRAY(Event, size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    _current_event_id = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
    // Clear the event buffer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    for (int index = 0; index < size; index++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
      buffer[index]._id = index + 1;       // index + 1 is invalid id
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
      buffer[index].clear();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
Event*           EventBuffer::buffer;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
int              EventBuffer::size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
volatile EventID EventBuffer::_current_event_id;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
int              EventBuffer::indent;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
////////////////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
// Events
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
// Events::log() is safe for signal handlers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
void Events::log(const char* format, ...) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  if (LogEvents) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
    va_list ap;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
    va_start(ap, format);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
    intptr_t arg_1 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
    intptr_t arg_2 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
    intptr_t arg_3 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
    va_end(ap);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    EventBuffer::add_event(format, arg_1, arg_2, arg_3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
void Events::print_all(outputStream *st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  EventBuffer::print_all(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
void Events::print_last(outputStream *st, int number) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  EventBuffer::print_last(st, number);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
///////////////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
// EventMark
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
EventMark::EventMark(const char* format, ...) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  if (LogEvents) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
    va_list ap;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
    va_start(ap, format);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
    intptr_t arg_1 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    intptr_t arg_2 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    intptr_t arg_3 = va_arg(ap, intptr_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
    va_end(ap);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
    EventBuffer::add_event(format, arg_1, arg_2, arg_3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
    EventBuffer::inc_indent();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
EventMark::~EventMark() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  if (LogEvents) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
    EventBuffer::dec_indent();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
    EventBuffer::add_event("done", 0, 0, 0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
///////////////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
void eventlog_init() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  EventBuffer::init();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
int print_all_events(outputStream *st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  EventBuffer::print_all(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  return 1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
void eventlog_init() {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
int print_all_events(outputStream *st) { return 0; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
#endif // PRODUCT