[vmkit-commits] [vmkit] r180481 - Incinerator does not need bundle uninstall/update notifications.
Peter Senna Tschudin
peter.senna at gmail.com
Thu Apr 25 10:16:34 PDT 2013
Author: peter.senna
Date: Thu Apr 25 12:15:03 2013
New Revision: 180481
URL: http://llvm.org/viewvc/llvm-project?rev=180481&view=rev
Log:
Incinerator does not need bundle uninstall/update notifications.
(cherry picked from commit 642053e1c5f1867732d5cac69506791fd0baf918)
Modified:
vmkit/trunk/incinerator/knopflerfish.patch
vmkit/trunk/lib/j3/VMCore/Jnjvm.h
vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp
vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp
Modified: vmkit/trunk/incinerator/knopflerfish.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/knopflerfish.patch?rev=180481&r1=180480&r2=180481&view=diff
==============================================================================
--- vmkit/trunk/incinerator/knopflerfish.patch (original)
+++ vmkit/trunk/incinerator/knopflerfish.patch Thu Apr 25 12:15:03 2013
@@ -8,7 +8,6 @@ Index: knopflerfish/osgi/framework/src/j
+public class OSGi
+{
+ public static native void associateBundleClass(long bundleID, Class classObject);
-+ public static native void notifyBundleUninstalled(long bundleID);
+}
Index: knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java
===================================================================
@@ -28,23 +27,3 @@ Index: knopflerfish/osgi/framework/src/o
fwCtx.listeners.frameworkError(bpkgs.bg.bundle, ioe);
return null;
}
-Index: knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleImpl.java
-===================================================================
---- knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleImpl.java 2013-01-15 10:58:00.907832000 +0100
-+++ knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleImpl.java 2013-02-11 10:49:24.948851000 +0100
-@@ -767,6 +767,7 @@
- bundleThread().bundleChanged(new BundleEvent(BundleEvent.UNRESOLVED, this));
- }
- bundleThread().bundleChanged(new BundleEvent(BundleEvent.UPDATED, this));
-+ j3.vm.OSGi.notifyBundleUninstalled(getBundleId());
- operation = IDLE;
-
- // Restart bundles previously stopped in the operation
-@@ -905,6 +906,7 @@
- }
- }
- fwCtx.listeners.bundleChanged(new BundleEvent(BundleEvent.UNINSTALLED, this));
-+ j3.vm.OSGi.notifyBundleUninstalled(getBundleId());
- }
-
-
Modified: vmkit/trunk/lib/j3/VMCore/Jnjvm.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/Jnjvm.h?rev=180481&r1=180480&r2=180481&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/Jnjvm.h (original)
+++ vmkit/trunk/lib/j3/VMCore/Jnjvm.h Thu Apr 25 12:15:03 2013
@@ -372,8 +372,6 @@ public:
virtual void resetReferenceIfStale(const void* source, void** ref);
void dumpClassLoaderBundles();
- void notifyBundleUninstalled(int64_t bundleID);
-
int64_t getClassLoaderBundleID(JnjvmClassLoader* loader);
JnjvmClassLoader* getBundleClassLoader(int64_t bundleID);
void setBundleClassLoader(int64_t bundleID, JnjvmClassLoader* loader);
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp?rev=180481&r1=180480&r2=180481&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp Thu Apr 25 12:15:03 2013
@@ -61,12 +61,6 @@ void Jnjvm::setBundleClassLoader(int64_t
bundleClassLoaders[bundleID] = loader;
}
-void Jnjvm::notifyBundleUninstalled(int64_t bundleID)
-{
-// if (bundleID == -1) return;
- scanStaleReferences = true;
-}
-
}
#endif
@@ -89,21 +83,6 @@ extern "C" void Java_j3_vm_OSGi_associat
#endif
}
-
-/*
- This Java native method must be called by the framework whenever a bundle
- is uninstalled or updated. It activates the logic used to scan for stale
- references to be performed in the next GC collection.
-*/
-extern "C" void Java_j3_vm_OSGi_notifyBundleUninstalled(jlong bundleID)
-{
-#if RESET_STALE_REFERENCES
-
- Jnjvm* vm = JavaThread::get()->getJVM();
- vm->notifyBundleUninstalled(bundleID);
-
-#endif
-}
/*
The VM manager bundle calls this method to reset all references to a given bundle. This enables
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp?rev=180481&r1=180480&r2=180481&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp Thu Apr 25 12:15:03 2013
@@ -22,6 +22,7 @@ void Jnjvm::resetReferencesToBundle(int6
// garbage collection phase.
loader->markZombie();
+ scanStaleReferences = true; // Enable stale references scanning
vmkit::Collector::collect(); // Start a garbage collection now
}
More information about the vmkit-commits
mailing list