calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 1027 2004-04-26 15:53:01Z twisti $
+ $Id: builtin.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "mm/boehm.h"
#include "threads/thread.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "nat/java_lang_Cloneable.h"
#include "nat/java_lang_VMObject.h"
Changes: Edwin Steiner
- $Id: builtin.h 1027 2004-04-26 15:53:01Z twisti $
+ $Id: builtin.h 1067 2004-05-18 10:25:51Z stefan $
*/
#define _BUILTIN_H
#include "config.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
Changes: Mark Probst
Philipp Tomsich
- $Id: headers.c 1053 2004-05-05 12:27:04Z stefan $
+ $Id: headers.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "mm/boehm.h"
#include "toolbox/chain.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "nat/java_lang_String.h"
memory. All functions writing values into the data area return the offset
relative the begin of the code area (start of procedure).
- $Id: codegen.inc 1049 2004-05-05 11:43:11Z stefan $
+ $Id: codegen.inc 1067 2004-05-18 10:25:51Z stefan $
*/
#include <string.h>
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
Authors: Dieter Thuernbeck
- $Id: inline.c 1009 2004-03-31 22:44:07Z edwin $
+ $Id: inline.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "parse.h"
#include "loader.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
Changes: Edwin Steiner
- $Id: jit.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: jit.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop/loop.h"
#include "loop/graph.h"
#include "loop/analyze.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
bounds are never violated. The function to call is
optimize_loops().
- $Id: analyze.c 665 2003-11-21 18:36:43Z jowenn $
+ $Id: analyze.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop.h"
#include "graph.h"
#include "tracing.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
algorithm that uses dominator trees (found eg. in modern compiler
implementation by a.w. appel)
- $Id: loop.c 665 2003-11-21 18:36:43Z jowenn $
+ $Id: loop.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop.h"
#include "graph.h"
#include "tracing.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
/* GLOBAL VARS */
Changes: Carolyn Oates
Edwin Steiner
- $Id: parse.c 1045 2004-04-26 19:17:27Z twisti $
+ $Id: parse.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "loader.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
/* data about the currently parsed method */
Authors: Carolyn Oates
- $Id: parseRT.h 907 2004-01-29 13:20:05Z carolyn $
+ $Id: parseRT.h 1067 2004-05-18 10:25:51Z stefan $
*/
#include "sets.h"
#include "tables.h"
-#include"toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "types.h"
Changes: Edwin Steiner
- $Id: stack.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: stack.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "reg.h"
#include "tables.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
Authors: Edwin Steiner
- $Id: typecheck.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: typecheck.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "loader.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
/****************************************************************************/
Changes: Joseph Wenninger
- $Id: jni.c 1030 2004-04-26 16:03:01Z twisti $
+ $Id: jni.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "builtin.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "nat/java_lang_Byte.h"
#include "nat/java_lang_Character.h"
Mark Probst
Edwin Steiner
- $Id: loader.c 1058 2004-05-16 13:14:41Z twisti $
+ $Id: loader.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jit.h"
#include "asmpart.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
#include "threads/locks.h"
#include "nat/java_lang_Throwable.h"
- Calling the class loader
- Running the main method
- $Id: main.c 1032 2004-04-26 16:09:10Z twisti $
+ $Id: main.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "mm/boehm.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "parseRTstats.h"
#include "nat/java_lang_Throwable.h"
Authors: Stefan Ring
- $Id: boehm.c 1026 2004-04-25 21:45:48Z twisti $
+ $Id: boehm.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "asmpart.h"
#include "builtin.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "gc.h"
Changes: Joseph Wenninger
- $Id: Constructor.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: Constructor.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "tables.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
#include "java_lang_reflect_Constructor.h"
Changes: Joseph Wenninger
- $Id: FileChannelImpl.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: FileChannelImpl.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include <stdlib.h>
#include "jni.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "gnu_classpath_RawData.h"
#include "java_nio_channels_FileChannelImpl.h"
Changes: Joseph Wenninger
- $Id: Method.c 940 2004-03-06 14:04:15Z jowenn $
+ $Id: Method.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "types.h"
#include "builtin.h"
#include "native.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
#include "java_lang_reflect_Method.h"
Changes: Joseph Wenninger
- $Id: Proxy.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: Proxy.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
Christian Thalinger
- $Id: Runtime.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: Runtime.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "asmpart.h"
#include "mm/boehm.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_io_File.h"
#include "java_lang_String.h"
Changes: Joseph Wenninger
- $Id: Thread.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: Thread.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "tables.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_ThreadGroup.h"
#include "java_lang_Object.h" /* needed for java_lang_Thread.h */
#include "java_lang_Throwable.h" /* needed for java_lang_Thread.h */
Changes: Joseph Wenninger
- $Id: VMClass.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMClass.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "native.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
Changes: Joseph Wenninger
- $Id: VMClassLoader.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMClassLoader.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "native.h"
#include "builtin.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
#include "java_lang_String.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
- $Id: VMObject.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMObject.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "mm/boehm.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_lang_Cloneable.h"
#include "java_lang_Object.h"
Changes: Joseph Wenninger
- $Id: VMObjectStreamClass.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: VMObjectStreamClass.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
#include "types.h"
#include "loader.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
Changes: Joseph Wenninger
- $Id: VMSecurityManager.c 977 2004-03-25 18:37:52Z twisti $
+ $Id: VMSecurityManager.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "builtin.h"
#include "native.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
- $Id: VMSystem.c 1003 2004-03-30 22:56:04Z twisti $
+ $Id: VMSystem.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
#include "builtin.h"
#include "native.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
The .hh files created with the header file generator are all
included here as are the C functions implementing these methods.
- $Id: native.c 1033 2004-04-26 16:18:56Z twisti $
+ $Id: native.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "loader.h"
#include "jni.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "threads/thread.h"
#include "threads/threadio.h"
- Calling the class loader
- Running the main method
- $Id: cacao.c 1032 2004-04-26 16:09:10Z twisti $
+ $Id: cacao.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "mm/boehm.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "parseRTstats.h"
#include "nat/java_lang_Throwable.h"
Changes: Mark Probst
Philipp Tomsich
- $Id: headers.c 1053 2004-05-05 12:27:04Z stefan $
+ $Id: headers.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "mm/boehm.h"
#include "toolbox/chain.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "nat/java_lang_String.h"
Authors: Stefan Ring
- $Id: boehm.c 1026 2004-04-25 21:45:48Z twisti $
+ $Id: boehm.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "asmpart.h"
#include "builtin.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "gc.h"
Authors: Reinhard Grafl
- $Id: memory.c 799 2003-12-16 22:30:41Z edwin $
+ $Id: memory.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include <unistd.h>
#include "global.h"
-#include "loging.h"
+#include "logging.h"
#include "memory.h"
Changes: Joseph Wenninger
- $Id: jni.c 1030 2004-04-26 16:03:01Z twisti $
+ $Id: jni.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "builtin.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "nat/java_lang_Byte.h"
#include "nat/java_lang_Character.h"
The .hh files created with the header file generator are all
included here as are the C functions implementing these methods.
- $Id: native.c 1033 2004-04-26 16:18:56Z twisti $
+ $Id: native.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "loader.h"
#include "jni.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "threads/thread.h"
#include "threads/threadio.h"
Changes: Joseph Wenninger
- $Id: Constructor.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: Constructor.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "tables.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
#include "java_lang_reflect_Constructor.h"
Changes: Joseph Wenninger
- $Id: FileChannelImpl.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: FileChannelImpl.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include <stdlib.h>
#include "jni.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "gnu_classpath_RawData.h"
#include "java_nio_channels_FileChannelImpl.h"
Changes: Joseph Wenninger
- $Id: Method.c 940 2004-03-06 14:04:15Z jowenn $
+ $Id: Method.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "types.h"
#include "builtin.h"
#include "native.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
#include "java_lang_reflect_Method.h"
Changes: Joseph Wenninger
- $Id: Proxy.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: Proxy.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
- $Id: VMClass.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMClass.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "native.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_lang_Object.h"
#include "java_lang_Class.h"
Changes: Joseph Wenninger
- $Id: VMClassLoader.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMClassLoader.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "native.h"
#include "builtin.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
#include "java_lang_String.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
- $Id: VMObject.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMObject.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "mm/boehm.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_lang_Cloneable.h"
#include "java_lang_Object.h"
Changes: Joseph Wenninger
- $Id: VMObjectStreamClass.c 873 2004-01-11 20:59:29Z twisti $
+ $Id: VMObjectStreamClass.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
#include "types.h"
#include "loader.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Class.h"
Changes: Joseph Wenninger
Christian Thalinger
- $Id: VMRuntime.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMRuntime.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "asmpart.h"
#include "mm/boehm.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "java_io_File.h"
#include "java_lang_String.h"
Changes: Joseph Wenninger
- $Id: VMSecurityManager.c 977 2004-03-25 18:37:52Z twisti $
+ $Id: VMSecurityManager.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "builtin.h"
#include "native.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_ClassLoader.h"
Changes: Joseph Wenninger
- $Id: VMSystem.c 1003 2004-03-30 22:56:04Z twisti $
+ $Id: VMSystem.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jni.h"
#include "builtin.h"
#include "native.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_Object.h"
Changes: Joseph Wenninger
- $Id: VMThread.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMThread.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loader.h"
#include "tables.h"
#include "threads/thread.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "java_lang_ThreadGroup.h"
#include "java_lang_Object.h" /* needed for java_lang_Thread.h */
#include "java_lang_Throwable.h" /* needed for java_lang_Thread.h */
#include "loader.h"
#include "builtin.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "toolbox/avl.h"
#include "loader.h"
#include "builtin.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "toolbox/avl.h"
#include "mm/boehm.h"
## Process this file with automake to produce Makefile.in
-# $Id: Makefile.am 882 2004-01-14 12:37:05Z stefan $
+# $Id: Makefile.am 1067 2004-05-18 10:25:51Z stefan $
noinst_LIBRARIES = libtoolbox.a
avl.h \
memory.c \
memory.h \
- loging.c \
- loging.h \
+ logging.c \
+ logging.h \
chain.c \
chain.h \
tree.c \
--- /dev/null
+/* toolbox/logging.c - contains logging functions
+
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Institut f. Computersprachen, TU Wien
+ R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
+ S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
+ J. Wenninger
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ Contact: cacao@complang.tuwien.ac.at
+
+ Authors: Reinhard Grafl
+
+ $Id: logging.c 1067 2004-05-18 10:25:51Z stefan $
+
+*/
+
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include "global.h"
+#include "logging.h"
+
+
+/***************************************************************************
+ LOG FILE HANDLING
+***************************************************************************/
+
+FILE *logfile = NULL;
+
+
+
+void log_init(char *fname)
+{
+ if (fname) {
+ if (fname[0]) {
+ logfile = fopen(fname, "w");
+ }
+ }
+}
+
+
+/*********************** Function: dolog ************************************
+
+Writes logtext to the protocol file (if opened) or to stdout.
+
+**************************************************************************/
+
+void dolog(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "%s\n",logtext);
+ fflush(logfile);
+
+ } else {
+ fprintf(stdout,"LOG: %s\n",logtext);
+ fflush(stdout);
+ }
+}
+
+
+/******************** Function: dolog_plain *******************************
+
+Writes logtext to the protocol file (if opened) or to stdout.
+
+**************************************************************************/
+
+void dolog_plain(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "%s",logtext);
+ fflush(logfile);
+
+ } else {
+ fprintf(stdout,"%s",logtext);
+ fflush(stdout);
+ }
+}
+
+
+/********************* Function: log_text ********************************/
+
+void log_text(char *text)
+{
+ dolog("%s", text);
+}
+
+
+/******************** Function: log_plain *******************************/
+
+void log_plain(char *text)
+{
+ dolog_plain("%s", text);
+}
+
+
+/****************** Function: get_logfile *******************************/
+
+FILE *get_logfile()
+{
+ return (logfile) ? logfile : stdout;
+}
+
+
+/****************** Function: log_flush *********************************/
+
+void log_flush()
+{
+ fflush(get_logfile());
+}
+
+
+/********************* Function: log_nl *********************************/
+
+void log_nl()
+{
+ log_plain("\n");
+ fflush(get_logfile());
+}
+
+
+/********************* Function: log_cputime ****************************/
+
+void log_cputime()
+{
+ s8 t;
+ int sec, usec;
+ char logtext[MAXLOGTEXT];
+
+ t = getcputime();
+ sec = t / 1000000;
+ usec = t % 1000000;
+
+ sprintf(logtext, "Total CPU usage: %d seconds and %d milliseconds",
+ sec, usec / 1000);
+ log_text(logtext);
+}
+
+
+/************************** Function: error *******************************
+
+Like dolog(), but terminates the program immediately.
+
+**************************************************************************/
+
+void error(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "ERROR: %s\n", logtext);
+ }
+
+ fprintf(stderr, "ERROR: %s\n", logtext);
+ exit(10);
+}
+
+
+/************************ Function: panic (txt) ****************************
+
+ Like error(), takes the text to output as an argument
+
+***************************************************************************/
+
+void panic(char *txt)
+{
+ error("%s", txt);
+}
+
+
+/********************** Function: getcputime ********************************
+
+ Returns the used CPU time in microseconds
+
+****************************************************************************/
+
+s8 getcputime()
+{
+ struct rusage ru;
+ int sec, usec;
+
+ getrusage(RUSAGE_SELF, &ru);
+ sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
+ usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
+
+ return sec * 1000000 + usec;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
--- /dev/null
+/* toolbox/logging.h - contains logging functions
+
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Institut f. Computersprachen, TU Wien
+ R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
+ S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
+ J. Wenninger
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ Contact: cacao@complang.tuwien.ac.at
+
+ Authors: Reinhard Grafl
+
+ $Id: logging.h 1067 2004-05-18 10:25:51Z stefan $
+
+*/
+
+
+#ifndef _LOGGING_H
+#define _LOGGING_H
+
+#include <stdio.h>
+
+
+#define PANICIF(when,txt) if(when)panic(txt)
+
+#define MAXLOGTEXT 500
+
+/* function prototypes */
+
+void log_init(char *fname);
+void log_text(char *txt);
+void log_plain(char *txt); /* same as log_text without "LOG: " and newline */
+void log_flush(); /* fflush logfile */
+void log_nl(); /* newline and fflush */
+
+void log_cputime();
+
+void dolog(char *txt, ...);
+void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline */
+void error(char *txt, ...);
+void panic(char *txt);
+
+FILE *get_logfile(); /* return the current logfile */
+
+s8 getcputime();
+
+#endif /* _LOGGING_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 1027 2004-04-26 15:53:01Z twisti $
+ $Id: builtin.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "mm/boehm.h"
#include "threads/thread.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "nat/java_lang_Cloneable.h"
#include "nat/java_lang_VMObject.h"
Changes: Edwin Steiner
- $Id: builtin.h 1027 2004-04-26 15:53:01Z twisti $
+ $Id: builtin.h 1067 2004-05-18 10:25:51Z stefan $
*/
#define _BUILTIN_H
#include "config.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
memory. All functions writing values into the data area return the offset
relative the begin of the code area (start of procedure).
- $Id: codegen.inc 1049 2004-05-05 11:43:11Z stefan $
+ $Id: codegen.inc 1067 2004-05-18 10:25:51Z stefan $
*/
#include <string.h>
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
Authors: Dieter Thuernbeck
- $Id: inline.c 1009 2004-03-31 22:44:07Z edwin $
+ $Id: inline.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "parse.h"
#include "loader.h"
#include "tables.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
Authors: Carolyn Oates
- $Id: parseRT.h 907 2004-01-29 13:20:05Z carolyn $
+ $Id: parseRT.h 1067 2004-05-18 10:25:51Z stefan $
*/
#include "sets.h"
#include "tables.h"
-#include"toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "types.h"
Changes: Edwin Steiner
- $Id: jit.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: jit.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop/loop.h"
#include "loop/graph.h"
#include "loop/analyze.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
bounds are never violated. The function to call is
optimize_loops().
- $Id: analyze.c 665 2003-11-21 18:36:43Z jowenn $
+ $Id: analyze.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop.h"
#include "graph.h"
#include "tracing.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
algorithm that uses dominator trees (found eg. in modern compiler
implementation by a.w. appel)
- $Id: loop.c 665 2003-11-21 18:36:43Z jowenn $
+ $Id: loop.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "loop.h"
#include "graph.h"
#include "tracing.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
/* GLOBAL VARS */
Changes: Carolyn Oates
Edwin Steiner
- $Id: parse.c 1045 2004-04-26 19:17:27Z twisti $
+ $Id: parse.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "native.h"
#include "loader.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
/* data about the currently parsed method */
Changes: Edwin Steiner
- $Id: stack.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: stack.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "reg.h"
#include "tables.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
Authors: Edwin Steiner
- $Id: typecheck.c 1038 2004-04-26 16:41:30Z twisti $
+ $Id: typecheck.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "tables.h"
#include "loader.h"
#include "types.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
/****************************************************************************/
Authors: Edwin Steiner
- $Id: typeinfo.c 1035 2004-04-26 16:26:35Z twisti $
+ $Id: typeinfo.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "typeinfo.h"
#include "tables.h"
#include "loader.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "jit/jit.h" /* XXX move typeinfo.* into jit/ */
Mark Probst
Edwin Steiner
- $Id: loader.c 1058 2004-05-16 13:14:41Z twisti $
+ $Id: loader.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "jit.h"
#include "asmpart.h"
#include "toolbox/memory.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "threads/thread.h"
#include "threads/locks.h"
#include "nat/java_lang_Throwable.h"
- the heap
- additional support functions
- $Id: tables.c 1034 2004-04-26 16:20:33Z twisti $
+ $Id: tables.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "asmpart.h"
#include "threads/thread.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
- the heap
- additional support functions
- $Id: tables.c 1034 2004-04-26 16:20:33Z twisti $
+ $Id: tables.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "asmpart.h"
#include "threads/thread.h"
#include "threads/locks.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "loader.h"
#include "builtin.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "toolbox/avl.h"
#include "mm/boehm.h"
#include "loader.h"
#include "builtin.h"
#include "asmpart.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "toolbox/avl.h"
## Process this file with automake to produce Makefile.in
-# $Id: Makefile.am 882 2004-01-14 12:37:05Z stefan $
+# $Id: Makefile.am 1067 2004-05-18 10:25:51Z stefan $
noinst_LIBRARIES = libtoolbox.a
avl.h \
memory.c \
memory.h \
- loging.c \
- loging.h \
+ logging.c \
+ logging.h \
chain.c \
chain.h \
tree.c \
--- /dev/null
+/* toolbox/logging.c - contains logging functions
+
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Institut f. Computersprachen, TU Wien
+ R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
+ S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
+ J. Wenninger
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ Contact: cacao@complang.tuwien.ac.at
+
+ Authors: Reinhard Grafl
+
+ $Id: logging.c 1067 2004-05-18 10:25:51Z stefan $
+
+*/
+
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#include "global.h"
+#include "logging.h"
+
+
+/***************************************************************************
+ LOG FILE HANDLING
+***************************************************************************/
+
+FILE *logfile = NULL;
+
+
+
+void log_init(char *fname)
+{
+ if (fname) {
+ if (fname[0]) {
+ logfile = fopen(fname, "w");
+ }
+ }
+}
+
+
+/*********************** Function: dolog ************************************
+
+Writes logtext to the protocol file (if opened) or to stdout.
+
+**************************************************************************/
+
+void dolog(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "%s\n",logtext);
+ fflush(logfile);
+
+ } else {
+ fprintf(stdout,"LOG: %s\n",logtext);
+ fflush(stdout);
+ }
+}
+
+
+/******************** Function: dolog_plain *******************************
+
+Writes logtext to the protocol file (if opened) or to stdout.
+
+**************************************************************************/
+
+void dolog_plain(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "%s",logtext);
+ fflush(logfile);
+
+ } else {
+ fprintf(stdout,"%s",logtext);
+ fflush(stdout);
+ }
+}
+
+
+/********************* Function: log_text ********************************/
+
+void log_text(char *text)
+{
+ dolog("%s", text);
+}
+
+
+/******************** Function: log_plain *******************************/
+
+void log_plain(char *text)
+{
+ dolog_plain("%s", text);
+}
+
+
+/****************** Function: get_logfile *******************************/
+
+FILE *get_logfile()
+{
+ return (logfile) ? logfile : stdout;
+}
+
+
+/****************** Function: log_flush *********************************/
+
+void log_flush()
+{
+ fflush(get_logfile());
+}
+
+
+/********************* Function: log_nl *********************************/
+
+void log_nl()
+{
+ log_plain("\n");
+ fflush(get_logfile());
+}
+
+
+/********************* Function: log_cputime ****************************/
+
+void log_cputime()
+{
+ s8 t;
+ int sec, usec;
+ char logtext[MAXLOGTEXT];
+
+ t = getcputime();
+ sec = t / 1000000;
+ usec = t % 1000000;
+
+ sprintf(logtext, "Total CPU usage: %d seconds and %d milliseconds",
+ sec, usec / 1000);
+ log_text(logtext);
+}
+
+
+/************************** Function: error *******************************
+
+Like dolog(), but terminates the program immediately.
+
+**************************************************************************/
+
+void error(char *txt, ...)
+{
+ char logtext[MAXLOGTEXT];
+ va_list ap;
+
+ va_start(ap, txt);
+ vsprintf(logtext, txt, ap);
+ va_end(ap);
+
+ if (logfile) {
+ fprintf(logfile, "ERROR: %s\n", logtext);
+ }
+
+ fprintf(stderr, "ERROR: %s\n", logtext);
+ exit(10);
+}
+
+
+/************************ Function: panic (txt) ****************************
+
+ Like error(), takes the text to output as an argument
+
+***************************************************************************/
+
+void panic(char *txt)
+{
+ error("%s", txt);
+}
+
+
+/********************** Function: getcputime ********************************
+
+ Returns the used CPU time in microseconds
+
+****************************************************************************/
+
+s8 getcputime()
+{
+ struct rusage ru;
+ int sec, usec;
+
+ getrusage(RUSAGE_SELF, &ru);
+ sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
+ usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
+
+ return sec * 1000000 + usec;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
--- /dev/null
+/* toolbox/logging.h - contains logging functions
+
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Institut f. Computersprachen, TU Wien
+ R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
+ S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
+ J. Wenninger
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ Contact: cacao@complang.tuwien.ac.at
+
+ Authors: Reinhard Grafl
+
+ $Id: logging.h 1067 2004-05-18 10:25:51Z stefan $
+
+*/
+
+
+#ifndef _LOGGING_H
+#define _LOGGING_H
+
+#include <stdio.h>
+
+
+#define PANICIF(when,txt) if(when)panic(txt)
+
+#define MAXLOGTEXT 500
+
+/* function prototypes */
+
+void log_init(char *fname);
+void log_text(char *txt);
+void log_plain(char *txt); /* same as log_text without "LOG: " and newline */
+void log_flush(); /* fflush logfile */
+void log_nl(); /* newline and fflush */
+
+void log_cputime();
+
+void dolog(char *txt, ...);
+void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline */
+void error(char *txt, ...);
+void panic(char *txt);
+
+FILE *get_logfile(); /* return the current logfile */
+
+s8 getcputime();
+
+#endif /* _LOGGING_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
+++ /dev/null
-/* toolbox/loging.c - contains loging functions
-
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Institut f. Computersprachen, TU Wien
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
- S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
- J. Wenninger
-
- This file is part of CACAO.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
- Contact: cacao@complang.tuwien.ac.at
-
- Authors: Reinhard Grafl
-
- $Id: loging.c 750 2003-12-13 22:17:44Z twisti $
-
-*/
-
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#include "global.h"
-#include "loging.h"
-
-
-/***************************************************************************
- LOG FILE HANDLING
-***************************************************************************/
-
-FILE *logfile = NULL;
-
-
-
-void log_init(char *fname)
-{
- if (fname) {
- if (fname[0]) {
- logfile = fopen(fname, "w");
- }
- }
-}
-
-
-/*********************** Function: dolog ************************************
-
-Writes logtext to the protocol file (if opened) or to stdout.
-
-**************************************************************************/
-
-void dolog(char *txt, ...)
-{
- char logtext[MAXLOGTEXT];
- va_list ap;
-
- va_start(ap, txt);
- vsprintf(logtext, txt, ap);
- va_end(ap);
-
- if (logfile) {
- fprintf(logfile, "%s\n",logtext);
- fflush(logfile);
-
- } else {
- fprintf(stdout,"LOG: %s\n",logtext);
- fflush(stdout);
- }
-}
-
-
-/******************** Function: dolog_plain *******************************
-
-Writes logtext to the protocol file (if opened) or to stdout.
-
-**************************************************************************/
-
-void dolog_plain(char *txt, ...)
-{
- char logtext[MAXLOGTEXT];
- va_list ap;
-
- va_start(ap, txt);
- vsprintf(logtext, txt, ap);
- va_end(ap);
-
- if (logfile) {
- fprintf(logfile, "%s",logtext);
- fflush(logfile);
-
- } else {
- fprintf(stdout,"%s",logtext);
- fflush(stdout);
- }
-}
-
-
-/********************* Function: log_text ********************************/
-
-void log_text(char *text)
-{
- dolog("%s", text);
-}
-
-
-/******************** Function: log_plain *******************************/
-
-void log_plain(char *text)
-{
- dolog_plain("%s", text);
-}
-
-
-/****************** Function: get_logfile *******************************/
-
-FILE *get_logfile()
-{
- return (logfile) ? logfile : stdout;
-}
-
-
-/****************** Function: log_flush *********************************/
-
-void log_flush()
-{
- fflush(get_logfile());
-}
-
-
-/********************* Function: log_nl *********************************/
-
-void log_nl()
-{
- log_plain("\n");
- fflush(get_logfile());
-}
-
-
-/********************* Function: log_cputime ****************************/
-
-void log_cputime()
-{
- s8 t;
- int sec, usec;
- char logtext[MAXLOGTEXT];
-
- t = getcputime();
- sec = t / 1000000;
- usec = t % 1000000;
-
- sprintf(logtext, "Total CPU usage: %d seconds and %d milliseconds",
- sec, usec / 1000);
- log_text(logtext);
-}
-
-
-/************************** Function: error *******************************
-
-Like dolog(), but terminates the program immediately.
-
-**************************************************************************/
-
-void error(char *txt, ...)
-{
- char logtext[MAXLOGTEXT];
- va_list ap;
-
- va_start(ap, txt);
- vsprintf(logtext, txt, ap);
- va_end(ap);
-
- if (logfile) {
- fprintf(logfile, "ERROR: %s\n", logtext);
- }
-
- fprintf(stderr, "ERROR: %s\n", logtext);
- exit(10);
-}
-
-
-/************************ Function: panic (txt) ****************************
-
- Like error(), takes the text to output as an argument
-
-***************************************************************************/
-
-void panic(char *txt)
-{
- error("%s", txt);
-}
-
-
-/********************** Function: getcputime ********************************
-
- Returns the used CPU time in microseconds
-
-****************************************************************************/
-
-s8 getcputime()
-{
- struct rusage ru;
- int sec, usec;
-
- getrusage(RUSAGE_SELF, &ru);
- sec = ru.ru_utime.tv_sec + ru.ru_stime.tv_sec;
- usec = ru.ru_utime.tv_usec + ru.ru_stime.tv_usec;
-
- return sec * 1000000 + usec;
-}
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
+++ /dev/null
-/* toolbox/loging.h - contains loging functions
-
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Institut f. Computersprachen, TU Wien
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
- S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
- J. Wenninger
-
- This file is part of CACAO.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
- Contact: cacao@complang.tuwien.ac.at
-
- Authors: Reinhard Grafl
-
- $Id: loging.h 750 2003-12-13 22:17:44Z twisti $
-
-*/
-
-
-#ifndef _LOGGING_H
-#define _LOGGING_H
-
-#include <stdio.h>
-
-
-#define PANICIF(when,txt) if(when)panic(txt)
-
-#define MAXLOGTEXT 500
-
-/* function prototypes */
-
-void log_init(char *fname);
-void log_text(char *txt);
-void log_plain(char *txt); /* same as log_text without "LOG: " and newline */
-void log_flush(); /* fflush logfile */
-void log_nl(); /* newline and fflush */
-
-void log_cputime();
-
-void dolog(char *txt, ...);
-void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline */
-void error(char *txt, ...);
-void panic(char *txt);
-
-FILE *get_logfile(); /* return the current logfile */
-
-s8 getcputime();
-
-#endif /* _LOGGING_H */
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
Authors: Reinhard Grafl
- $Id: memory.c 799 2003-12-16 22:30:41Z edwin $
+ $Id: memory.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include <unistd.h>
#include "global.h"
-#include "loging.h"
+#include "logging.h"
#include "memory.h"
Authors: Edwin Steiner
- $Id: typeinfo.c 1035 2004-04-26 16:26:35Z twisti $
+ $Id: typeinfo.c 1067 2004-05-18 10:25:51Z stefan $
*/
#include "typeinfo.h"
#include "tables.h"
#include "loader.h"
-#include "toolbox/loging.h"
+#include "toolbox/logging.h"
#include "toolbox/memory.h"
#include "jit/jit.h" /* XXX move typeinfo.* into jit/ */