mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures
Change the kmemleak_object.flags type to unsigned int and moves the early_log.min_count (int) near early_log.op_type (int) to slightly reduce the size of these structures on 64-bit architectures. Link: http://lkml.kernel.org/r/1495726937-23557-2-git-send-email-catalin.marinas@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: "Luis R. Rodriguez" <mcgrof@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e0dd7d53a6
commit
f66abf09e0
|
@ -150,7 +150,7 @@ struct kmemleak_scan_area {
|
||||||
*/
|
*/
|
||||||
struct kmemleak_object {
|
struct kmemleak_object {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
unsigned long flags; /* object status flags */
|
unsigned int flags; /* object status flags */
|
||||||
struct list_head object_list;
|
struct list_head object_list;
|
||||||
struct list_head gray_list;
|
struct list_head gray_list;
|
||||||
struct rb_node rb_node;
|
struct rb_node rb_node;
|
||||||
|
@ -262,9 +262,9 @@ enum {
|
||||||
*/
|
*/
|
||||||
struct early_log {
|
struct early_log {
|
||||||
int op_type; /* kmemleak operation type */
|
int op_type; /* kmemleak operation type */
|
||||||
|
int min_count; /* minimum reference count */
|
||||||
const void *ptr; /* allocated/freed memory block */
|
const void *ptr; /* allocated/freed memory block */
|
||||||
size_t size; /* memory block size */
|
size_t size; /* memory block size */
|
||||||
int min_count; /* minimum reference count */
|
|
||||||
unsigned long trace[MAX_TRACE]; /* stack trace */
|
unsigned long trace[MAX_TRACE]; /* stack trace */
|
||||||
unsigned int trace_len; /* stack trace length */
|
unsigned int trace_len; /* stack trace length */
|
||||||
};
|
};
|
||||||
|
@ -393,7 +393,7 @@ static void dump_object_info(struct kmemleak_object *object)
|
||||||
object->comm, object->pid, object->jiffies);
|
object->comm, object->pid, object->jiffies);
|
||||||
pr_notice(" min_count = %d\n", object->min_count);
|
pr_notice(" min_count = %d\n", object->min_count);
|
||||||
pr_notice(" count = %d\n", object->count);
|
pr_notice(" count = %d\n", object->count);
|
||||||
pr_notice(" flags = 0x%lx\n", object->flags);
|
pr_notice(" flags = 0x%x\n", object->flags);
|
||||||
pr_notice(" checksum = %u\n", object->checksum);
|
pr_notice(" checksum = %u\n", object->checksum);
|
||||||
pr_notice(" backtrace:\n");
|
pr_notice(" backtrace:\n");
|
||||||
print_stack_trace(&trace, 4);
|
print_stack_trace(&trace, 4);
|
||||||
|
|
Loading…
Reference in New Issue