Mercurial > hg > truffle
comparison src/share/vm/compiler/compileBroker.cpp @ 2211:0cd39a385a72
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Mon, 21 Feb 2011 19:17:33 +0100 |
parents | d25d4ca69222 986b2844f7a2 |
children | 999f8086cc4f |
comparison
equal
deleted
inserted
replaced
2184:5d801e6b9a80 | 2211:0cd39a385a72 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 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. |
1292 // CompileBroker::is_compile_blocking | 1292 // CompileBroker::is_compile_blocking |
1293 // | 1293 // |
1294 // Should the current thread be blocked until this compilation request | 1294 // Should the current thread be blocked until this compilation request |
1295 // has been fulfilled? | 1295 // has been fulfilled? |
1296 bool CompileBroker::is_compile_blocking(methodHandle method, int osr_bci) { | 1296 bool CompileBroker::is_compile_blocking(methodHandle method, int osr_bci) { |
1297 return !BackgroundCompilation; | 1297 if (!BackgroundCompilation) { |
1298 Symbol* class_name = method->method_holder()->klass_part()->name(); | |
1299 if (class_name->starts_with("java/lang/ref/Reference", 23)) { | |
1300 // The reference handler thread can dead lock with the GC if compilation is blocking, | |
1301 // so we avoid blocking compiles for anything in the java.lang.ref.Reference class, | |
1302 // including inner classes such as ReferenceHandler. | |
1303 return false; | |
1304 } | |
1305 return true; | |
1306 } | |
1307 return false; | |
1298 } | 1308 } |
1299 | 1309 |
1300 | 1310 |
1301 // ------------------------------------------------------------------ | 1311 // ------------------------------------------------------------------ |
1302 // CompileBroker::preload_classes | 1312 // CompileBroker::preload_classes |