[Haiku-commits] r27759 - haiku/trunk/src/system/kernel

bonefish at BerliOS bonefish at mail.berlios.de
Sat Sep 27 21:07:30 CEST 2008


Author: bonefish
Date: 2008-09-27 21:07:30 +0200 (Sat, 27 Sep 2008)
New Revision: 27759
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=27759&view=rev

Modified:
   haiku/trunk/src/system/kernel/module.cpp
Log:
Temporary debug output to track down #2776.


Modified: haiku/trunk/src/system/kernel/module.cpp
===================================================================
--- haiku/trunk/src/system/kernel/module.cpp	2008-09-27 17:45:12 UTC (rev 27758)
+++ haiku/trunk/src/system/kernel/module.cpp	2008-09-27 19:07:30 UTC (rev 27759)
@@ -431,6 +431,7 @@
 	moduleImage->image = image;
 	moduleImage->ref_count = 0;
 
+TRACE(("load_module_image() inserting image %p, %s\n", moduleImage, moduleImage->path));
 	hash_insert(sModuleImagesHash, moduleImage);
 
 	TRACE(("load_module_image(\"%s\"): image loaded: %p\n", path, moduleImage));
@@ -463,7 +464,10 @@
 	}
 
 	if (remove)
+{
+TRACE(("unload_module_image() removing image %p, %s\n", moduleImage, moduleImage->path));
 		hash_remove(sModuleImagesHash, moduleImage);
+}
 
 	unload_kernel_add_on(moduleImage->image);
 	free(moduleImage->path);
@@ -1131,6 +1135,7 @@
 	moduleImage->image = image->id;
 	moduleImage->ref_count = 0;
 
+TRACE(("register_preloaded_module_image() inserting image %p, %s\n", moduleImage, moduleImage->path));
 	hash_insert(sModuleImagesHash, moduleImage);
 
 	for (info = moduleImage->info; *info; info++) {
@@ -1836,6 +1841,9 @@
 	// When the boot volume is also where the boot loader pre-loaded the images
 	// from, we get the actual paths for those images.
 	TRACE(("module_init_post_boot_device(%d)\n", bootingFromBootLoaderVolume));
+#ifdef TRACE_MODULE
+hash_dump_table(sModuleImagesHash);
+#endif
 
 	RecursiveLocker _(sModulesLock);
 
@@ -1941,9 +1949,13 @@
 	// re-insert the images that have got a new path
 	while (module_image* image = imagesToReinsert) {
 		imagesToReinsert = image->next;
+TRACE(("module_init_post_boot_device() re-inserting image %p, %s\n", image, image->path));
 		hash_insert(sModuleImagesHash, image);
 	}
 
+#ifdef TRACE_MODULE
+hash_dump_table(sModuleImagesHash);
+#endif
 	TRACE(("module_init_post_boot_device() done\n"));
 
 	return B_OK;




More information about the Haiku-commits mailing list