[PATCH v6 46/57] dyndbg: drop site-> in add-module, more needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 lib/dynamic_debug.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 41c23ec979f4..059212df68f9 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1347,7 +1347,7 @@ static int __ddebug_add_module(struct _ddebug_info *di, unsigned int base,
 	struct ddebug_table *dt;
 	int i;
 
-	v3pr_info("add-module: %s.%d sites, start: %d\n", modname, di->num_descs, base);
+	v3pr_info("add-module: %s %d/%d sites, start: %d\n", modname, di->num_descs, di->num_sites, base);
 	if (!di->num_descs) {
 		v3pr_info(" skip %s\n", modname);
 		return 0;
@@ -1375,19 +1375,20 @@ static int __ddebug_add_module(struct _ddebug_info *di, unsigned int base,
 	if (di->classes && di->num_classes)
 		ddebug_attach_module_classes(dt, di->classes, di->num_classes);
 
+	//BUG_ON(di->num_descs != di->num_sites);
+
 	for (i = 0; i < di->num_descs; i++) {
 
-		if (di->descs[i].site->_function != packed_sites[(*packed_base)]._function)
+		if (di->sites[i]._function != packed_sites[(*packed_base)]._function)
+
 			memcpy((void *) &packed_sites[++(*packed_base)],
-			       (void *) di->descs[i].site, sizeof(struct _ddebug_site));
-		else
-			di->descs[i].site = &packed_sites[(*packed_base)];
+			       (void *) &di->sites[i], sizeof(struct _ddebug_site));
 
 		di->descs[i]._index = i + base;
 		di->descs[i]._map = *packed_base;
 
-		v3pr_info(" %d %d %s.%s.%d - %d\n", i, *packed_base, modname,
-			  di->descs[i].site->_function, di->descs[i].lineno, *packed_base);
+		v3pr_info(" %d %d %s.%s.%d\n", i, *packed_base, modname,
+			  packed_sites[*packed_base]._function, di->descs[i].lineno);
 	}
 	mutex_lock(&ddebug_lock);
 	list_add_tail(&dt->link, &ddebug_tables);
-- 
2.37.2




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux