Mercurial > hg > graal-compiler
annotate src/share/vm/gc_implementation/g1/g1Log.cpp @ 17755:96b1c2e06e25
8027295: Free CSet takes ~50% of young pause time
Summary: Improve fast card cache iteration and avoid taking locks when freeing the collection set.
Reviewed-by: brutisso
author | tschatzl |
---|---|
date | Mon, 24 Mar 2014 15:30:36 +0100 |
parents | 5c86f8211d1e |
children |
rev | line source |
---|---|
6007
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
1 /* |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
4 * |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
8 * |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
13 * accompanied this code). |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
14 * |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
18 * |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
21 * questions. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
22 * |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
23 */ |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
24 |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
26 #include "gc_implementation/g1/g1_globals.hpp" |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
27 #include "gc_implementation/g1/g1Log.hpp" |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
28 #include "runtime/globals.hpp" |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
29 |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
30 G1Log::LogLevel G1Log::_level = G1Log::LevelNone; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
31 |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
32 // If G1LogLevel has not been set up we will use the values of PrintGC |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
33 // and PrintGCDetails for the logging level. |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
34 // - PrintGC maps to "fine". |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
35 // - PrintGCDetails maps to "finer". |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
36 void G1Log::init() { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
37 if (G1LogLevel != NULL && G1LogLevel[0] != '\0') { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
38 if (strncmp("none", G1LogLevel, 4) == 0 && G1LogLevel[4] == '\0') { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
39 _level = LevelNone; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
40 } else if (strncmp("fine", G1LogLevel, 4) == 0 && G1LogLevel[4] == '\0') { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
41 _level = LevelFine; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
42 } else if (strncmp("finer", G1LogLevel, 5) == 0 && G1LogLevel[5] == '\0') { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
43 _level = LevelFiner; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
44 } else if (strncmp("finest", G1LogLevel, 6) == 0 && G1LogLevel[6] == '\0') { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
45 _level = LevelFinest; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
46 } else { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
47 warning("Unknown logging level '%s', should be one of 'fine', 'finer' or 'finest'.", G1LogLevel); |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
48 } |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
49 } else { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
50 if (PrintGCDetails) { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
51 _level = LevelFiner; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
52 } else if (PrintGC) { |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
53 _level = LevelFine; |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
54 } |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
55 } |
5c86f8211d1e
7160728: Introduce an extra logging level for G1 logging
brutisso
parents:
diff
changeset
|
56 } |