Skip to content

Commit

Permalink
Add missing dependency for jvm heap file
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-serrano committed Nov 27, 2024
1 parent 925abb1 commit 67c2f55
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
8 changes: 4 additions & 4 deletions bde/bmem/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/* ------------------------------------------------------------- */
/* Author : Manuel Serrano */
/* Creation : Sun Apr 13 06:42:57 2003 */
/* Last change : Fri Jun 16 15:14:07 2023 (serrano) */
/* Copyright : 2003-23 Manuel Serrano */
/* Last change : Wed Nov 27 08:05:25 2024 (serrano) */
/* Copyright : 2003-24 Manuel Serrano */
/* ------------------------------------------------------------- */
/* Allocation replacement routines */
/*=====================================================================*/
Expand Down Expand Up @@ -346,10 +346,10 @@ dump_types_cnt() {
for (i = 0; i < types_number; i++) {
if ((all_types[i].cnt * 100 / sum) >= 1 ||
((double)(all_types[i].size)) / (1024. * 1024.) >= 1) {
fprintf(stderr, " %-20s: %8.2fMB %5.2f%% [%8ld]\n",
fprintf(stderr, " %-20s: %10.2fMB %6.2f%% [%10ld]\n",
all_types[i].name,
((double)(all_types[i].size)) / (1024. * 1024.),
((double)(all_types[i].size * 100)) / alloc_size,
(((double)(all_types[i].size) / (double)alloc_size) * 100.),
all_types[i].cnt);
}
}
Expand Down
84 changes: 42 additions & 42 deletions bde/bmem/lib/bmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/* ------------------------------------------------------------- */
/* Author : Manuel Serrano */
/* Creation : Sun Apr 13 06:29:17 2003 */
/* Last change : Sat Mar 5 09:45:04 2022 (serrano) */
/* Copyright : 2003-22 Manuel Serrano */
/* Last change : Wed Nov 27 08:05:35 2024 (serrano) */
/* Copyright : 2003-24 Manuel Serrano */
/* ------------------------------------------------------------- */
/* The allocation profiler include */
/*=====================================================================*/
Expand Down Expand Up @@ -34,17 +34,17 @@
/*---------------------------------------------------------------------*/
/* FAIL */
/*---------------------------------------------------------------------*/
#define FAIL( proc, msg, obj ) \
fprintf( stderr, "\n*** ERROR:%s\n%s -- %s\n", proc, msg, obj ), exit( -1 )
#define FAIL(proc, msg, obj) \
fprintf(stderr, "\n*** ERROR:%s\n%s -- %s\n", proc, msg, obj), exit(-1)

/*---------------------------------------------------------------------*/
/* MEMSIZE */
/*---------------------------------------------------------------------*/
/* #define BMEMSIZEOFWORD (4) */
/* #define BMEMSIZE( v ) ((v)/BMEMSIZEOFWORD) */
/* #define BMEMSIZE(v) ((v)/BMEMSIZEOFWORD) */

#define BMEMSIZEOFWORD (1)
#define BMEMSIZE( v ) v
#define BMEMSIZE(v) v

/*---------------------------------------------------------------------*/
/* Various types */
Expand All @@ -53,24 +53,24 @@ typedef void *(*fun_t)();

typedef struct gc_info {
unsigned long number;
unsigned long alloc_size;
unsigned long heap_size;
unsigned long live_size;
unsigned long long alloc_size;
unsigned long long heap_size;
unsigned long long live_size;
void *lastfun;
BGL_LONGLONG_T time;
} gc_info_t;

typedef struct fun_alloc_info {
unsigned long gc_num;
unsigned long dsize;
unsigned long isize;
unsigned long long dsize;
unsigned long long isize;
void *dtypes;
void *itypes;
} fun_alloc_info_t;

typedef struct type_alloc_info {
unsigned long num;
unsigned long size;
unsigned long long size;
} type_alloc_info_t;

typedef struct fun_info {
Expand All @@ -80,7 +80,7 @@ typedef struct fun_info {

typedef struct alloc_info {
long typenum;
long size;
unsigned long long size;
char *function;
char *filename;
long lineno;
Expand All @@ -89,15 +89,15 @@ typedef struct alloc_info {

typedef struct line_alloc {
long lineno;
long size;
unsigned long long size;
long count;
unsigned int typecount;
long *typenums;
} line_alloc_t;

typedef struct file_alloc {
char *filename;
long size;
unsigned long long size;
line_alloc_t *lines;
} file_alloc_t;

Expand Down Expand Up @@ -134,11 +134,11 @@ obj_t ident proto { \
obj_t ident proto { \
obj_t __res; \
long otnum = bmem_get_alloc_type(); \
fprintf( stderr, ">>> wrap " #ident "\n..."); \
fprintf(stderr, ">>> wrap " #ident "\n..."); \
bmem_set_alloc_type(tnum); \
__res = ____##ident call ; \
bmem_set_alloc_type(otnum); \
fprintf( stderr, "<<< wrap " #ident "\n..."); \
fprintf(stderr, "<<< wrap " #ident "\n..."); \
return __res; \
}

Expand Down Expand Up @@ -170,31 +170,31 @@ extern pthread_key_t bmem_key2;
extern pthread_key_t bmem_key3;
extern pthread_mutex_t bmem_mutex;

extern void mark_function( void *, long, long, long, int, int, long );
extern void mark_function(void *, long, long, long, int, int, long);

extern void *(*____pthread_getspecific)( pthread_key_t );
extern int (*____pthread_setspecific)( pthread_key_t, void * );
extern int (*____pthread_key_create)( pthread_key_t *, void (*)( void *) );
extern int (*____pthread_mutex_init)( pthread_mutex_t *, void * );
extern void *(*____pthread_getspecific)(pthread_key_t);
extern int (*____pthread_setspecific)(pthread_key_t, void *);
extern int (*____pthread_key_create)(pthread_key_t *, void (*)(void *));
extern int (*____pthread_mutex_init)(pthread_mutex_t *, void *);

extern void (*____GC_reset_allocated_bytes)();
extern void *(*____GC_malloc)( size_t );
extern void *(*____GC_realloc)( void *, size_t );
extern void *(*____GC_malloc_atomic)( size_t );
extern void *(*____GC_malloc_uncollectable)( size_t );
extern void *(*____GC_add_gc_hook)( void (*)() );
extern void *(*____GC_malloc)(size_t);
extern void *(*____GC_realloc)(void *, size_t);
extern void *(*____GC_malloc_atomic)(size_t);
extern void *(*____GC_malloc_uncollectable)(size_t);
extern void *(*____GC_add_gc_hook)(void (*)());
extern BGL_LONGLONG_T (*____bgl_current_nanoseconds)();

extern void (*____bgl_init_objects)();

extern void (*____bgl_init_trace_register)();
extern obj_t (*____bgl_get_trace_stack)(int);

extern void *(*____register_class )( void *, void *, void *,
extern void *(*____register_class)(void *, void *, void *,
long,
void *, void *, void *,
void *, void *,
void *, void * );
void *, void *);
extern int (*____bgl_types_number)();

/*---------------------------------------------------------------------*/
Expand All @@ -208,7 +208,7 @@ extern long bmem_get_alloc_type();
/*---------------------------------------------------------------------*/
/* Functions */
/*---------------------------------------------------------------------*/
extern void GC_collect_hook( int, long );
extern void GC_collect_hook(int, long);

/*---------------------------------------------------------------------*/
/* Lists */
Expand All @@ -218,23 +218,23 @@ typedef struct pa_pair {
void *cdr;
} pa_pair_t;

#define PA_PAIRP( l ) (l)
#define PA_CAR( l ) ((l)->car)
#define PA_CDR( l ) ((l)->cdr)
#define PA_PAIRP(l) (l)
#define PA_CAR(l) ((l)->car)
#define PA_CDR(l) ((l)->cdr)

extern void for_each( void (*)(void *, void *), pa_pair_t *, void * );
extern void for_each_json( void (*)(void *, void *), pa_pair_t *, void * );
extern pa_pair_t *pa_cons( void *, pa_pair_t * );
extern pa_pair_t *pa_reverse( pa_pair_t * );
extern pa_pair_t *pa_assq( void *, pa_pair_t * );
extern void for_each(void (*)(void *, void *), pa_pair_t *, void *);
extern void for_each_json(void (*)(void *, void *), pa_pair_t *, void *);
extern pa_pair_t *pa_cons(void *, pa_pair_t *);
extern pa_pair_t *pa_reverse(pa_pair_t *);
extern pa_pair_t *pa_assq(void *, pa_pair_t *);

/*---------------------------------------------------------------------*/
/* Trace */
/*---------------------------------------------------------------------*/
extern void *bgl_debug_trace_top( int );
extern char *bgl_debug_trace_top_name( int );
extern char *bgl_debug_trace_symbol_name( void * );
extern char *bgl_debug_trace_symbol_name_json( void * );
extern void *bgl_debug_trace_top(int);
extern char *bgl_debug_trace_top_name(int);
extern char *bgl_debug_trace_symbol_name(void *);
extern char *bgl_debug_trace_symbol_name_json(void *);

#if !BGL_HAVE_BACKTRACE
typedef int (*backtrace_full_callback)();
Expand Down
4 changes: 2 additions & 2 deletions runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#* ------------------------------------------------------------- */
#* Author : Manuel Serrano */
#* Creation : Tue Mar 21 08:14:18 1995 */
#* Last change : Sat Nov 2 00:42:48 2024 (serrano) */
#* Last change : Wed Nov 27 11:21:09 2024 (serrano) */
#* Copyright : 1995-2024 Manuel Serrano, see LICENSE file */
#* ------------------------------------------------------------- */
#* The (gnu) makefile to build the Bigloo's library. */
Expand Down Expand Up @@ -440,7 +440,7 @@ heap-c: .afile includes
$(BIGLOO) $(BHEAPFLAGS) $(EFLAGS) -L $(BOOTLIBDIR) Llib/make_lib.scm -heap $(HEAPC_FILE)
@ echo "\e[1;35m$(HEAPC_FILE)\e[0m done."

heap-jvm: .afile .jfile includes
heap-jvm: .afile .jfile includes lib-jvm_u
$(RM) -f $(BOOTLIBDIR)/$(HEAPJVM_FILE)
$(BIGLOO) -target jvm -jfile .jfile -L $(BOOTLIBDIR) $(BHEAPFLAGS) \
$(EFLAGS) Llib/make_lib.scm -heap $(HEAPJVM_FILE)
Expand Down

0 comments on commit 67c2f55

Please sign in to comment.