kernel/linux-2.6-debug-sizeof-structs.patch

34 lines
1.4 KiB
Diff
Raw Normal View History

2011-03-28 19:15:32 +00:00
diff --git a/kernel/smp.c b/kernel/smp.c
index 73a1951..4ce4c50 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -667,6 +667,11 @@ void __init setup_nr_cpu_ids(void)
2010-07-29 23:46:31 +00:00
nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
}
2010-10-22 02:38:00 +00:00
+#include <../fs/ext4/ext4.h>
2010-07-29 23:46:31 +00:00
+#include <linux/ext3_fs_i.h>
+#include <linux/skbuff.h>
+#include <linux/sched.h>
+
/* Called by boot processor to activate the rest. */
2011-03-28 19:15:32 +00:00
void __init smp_init(void)
2010-07-29 23:46:31 +00:00
{
2011-03-28 19:15:32 +00:00
@@ -683,6 +688,16 @@ void __init smp_init(void)
2010-07-29 23:46:31 +00:00
/* Any cleanup work */
printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
smp_cpus_done(setup_max_cpus);
+
+ printk(KERN_DEBUG "sizeof(vma)=%u bytes\n", (unsigned int) sizeof(struct vm_area_struct));
+ printk(KERN_DEBUG "sizeof(page)=%u bytes\n", (unsigned int) sizeof(struct page));
+ printk(KERN_DEBUG "sizeof(inode)=%u bytes\n", (unsigned int) sizeof(struct inode));
+ printk(KERN_DEBUG "sizeof(dentry)=%u bytes\n", (unsigned int) sizeof(struct dentry));
+ printk(KERN_DEBUG "sizeof(ext3inode)=%u bytes\n", (unsigned int) sizeof(struct ext3_inode_info));
2010-10-22 02:38:00 +00:00
+ printk(KERN_DEBUG "sizeof(ext4inode)=%u bytes\n", (unsigned int) sizeof(struct ext4_inode_info));
2010-07-29 23:46:31 +00:00
+ printk(KERN_DEBUG "sizeof(buffer_head)=%u bytes\n", (unsigned int) sizeof(struct buffer_head));
+ printk(KERN_DEBUG "sizeof(skbuff)=%u bytes\n", (unsigned int) sizeof(struct sk_buff));
+ printk(KERN_DEBUG "sizeof(task_struct)=%u bytes\n", (unsigned int) sizeof(struct task_struct));
}
2011-03-28 19:15:32 +00:00
/*