comparison src/share/vm/runtime/os.hpp @ 2250:f7de3327c683

7017124: Fix some VM stats to avoid 32-bit overflow Summary: Added new method inc_stat_counter() to increment long statistic values and use atomic long load and store. Reviewed-by: dholmes, jrose, phh, never
author kvn
date Mon, 07 Feb 2011 10:34:39 -0800
parents 828eafbd85cc
children 850b2295a494
comparison
equal deleted inserted replaced
2249:3763ca6579b7 2250:f7de3327c683
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
557 static void free (void *memblock); 557 static void free (void *memblock);
558 static bool check_heap(bool force = false); // verify C heap integrity 558 static bool check_heap(bool force = false); // verify C heap integrity
559 static char* strdup(const char *); // Like strdup 559 static char* strdup(const char *); // Like strdup
560 560
561 #ifndef PRODUCT 561 #ifndef PRODUCT
562 static int num_mallocs; // # of calls to malloc/realloc 562 static julong num_mallocs; // # of calls to malloc/realloc
563 static size_t alloc_bytes; // # of bytes allocated 563 static julong alloc_bytes; // # of bytes allocated
564 static int num_frees; // # of calls to free 564 static julong num_frees; // # of calls to free
565 static julong free_bytes; // # of bytes freed
565 #endif 566 #endif
566 567
567 // SocketInterface (ex HPI SocketInterface ) 568 // SocketInterface (ex HPI SocketInterface )
568 static int socket(int domain, int type, int protocol); 569 static int socket(int domain, int type, int protocol);
569 static int socket_close(int fd); 570 static int socket_close(int fd);