src/share/vm/services/heapDumper.hpp

changeset 2130
30f67acf635d
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/services/heapDumper.hpp	Wed Sep 08 08:34:57 2010 -0700
     1.2 +++ b/src/share/vm/services/heapDumper.hpp	Sat Sep 11 08:18:31 2010 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -39,8 +39,12 @@
    1.11    char* _error;
    1.12    bool _print_to_tty;
    1.13    bool _gc_before_heap_dump;
    1.14 +  bool _oome;
    1.15    elapsedTimer _t;
    1.16  
    1.17 +  HeapDumper(bool gc_before_heap_dump, bool print_to_tty, bool oome) :
    1.18 +    _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(print_to_tty), _oome(oome) { }
    1.19 +
    1.20    // string representation of error
    1.21    char* error() const                   { return _error; }
    1.22    void set_error(char* error);
    1.23 @@ -51,11 +55,11 @@
    1.24    // internal timer.
    1.25    elapsedTimer* timer()                 { return &_t; }
    1.26  
    1.27 +  static void dump_heap(bool oome);
    1.28 +
    1.29   public:
    1.30    HeapDumper(bool gc_before_heap_dump) :
    1.31 -    _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(false) { }
    1.32 -  HeapDumper(bool gc_before_heap_dump, bool print_to_tty) :
    1.33 -    _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(print_to_tty) { }
    1.34 +    _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(false), _oome(false) { }
    1.35  
    1.36    ~HeapDumper();
    1.37  
    1.38 @@ -66,4 +70,6 @@
    1.39    char* error_as_C_string() const;
    1.40  
    1.41    static void dump_heap()    KERNEL_RETURN;
    1.42 +
    1.43 +  static void dump_heap_from_oome()    KERNEL_RETURN;
    1.44  };

mercurial