6766644: Redefinition of compiled method fails with assertion "Can not load classes with the Compiler thread"

Defer posting events from the compiler thread: use service thread

Reviewed-by: coleenp, dholmes, never, dcubed
This commit is contained in:
Keith McGuigan 2011-02-02 14:38:01 -05:00
parent 052aed6276
commit 8a44936bb0
21 changed files with 617 additions and 298 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -696,10 +696,11 @@ public:
class nmethodLocker : public StackObj {
nmethod* _nm;
public:
static void lock_nmethod(nmethod* nm); // note: nm can be NULL
static void unlock_nmethod(nmethod* nm); // (ditto)
public:
nmethodLocker(address pc); // derive nm from pc
nmethodLocker(nmethod *nm) { _nm = nm; lock_nmethod(_nm); }
nmethodLocker() { _nm = NULL; }