[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190418084253.720040206@linutronix.de>
Date: Thu, 18 Apr 2019 10:41:26 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org,
Andy Lutomirski <luto@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Alexander Potapenko <glider@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>, linux-mm@...ck.org,
David Rientjes <rientjes@...gle.com>,
Christoph Lameter <cl@...ux.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
kasan-dev@...glegroups.com,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Akinobu Mita <akinobu.mita@...il.com>,
iommu@...ts.linux-foundation.org,
Robin Murphy <robin.murphy@....com>,
Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
David Sterba <dsterba@...e.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
linux-btrfs@...r.kernel.org, dm-devel@...hat.com,
Mike Snitzer <snitzer@...hat.com>,
Alasdair Kergon <agk@...hat.com>,
intel-gfx@...ts.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Daniel Vetter <daniel@...ll.ch>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
linux-arch@...r.kernel.org
Subject: [patch V2 07/29] mm/slub: Simplify stack trace retrieval
Replace the indirection through struct stack_trace with an invocation of
the storage array based interface.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: linux-mm@...ck.org
Cc: David Rientjes <rientjes@...gle.com>
Cc: Christoph Lameter <cl@...ux.com>
---
mm/slub.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -552,18 +552,14 @@ static void set_track(struct kmem_cache
if (addr) {
#ifdef CONFIG_STACKTRACE
- struct stack_trace trace;
+ unsigned int nr_entries;
- trace.nr_entries = 0;
- trace.max_entries = TRACK_ADDRS_COUNT;
- trace.entries = p->addrs;
- trace.skip = 3;
metadata_access_enable();
- save_stack_trace(&trace);
+ nr_entries = stack_trace_save(p->addrs, TRACK_ADDRS_COUNT, 3);
metadata_access_disable();
- if (trace.nr_entries < TRACK_ADDRS_COUNT)
- p->addrs[trace.nr_entries] = 0;
+ if (nr_entries < TRACK_ADDRS_COUNT)
+ p->addrs[nr_entries] = 0;
#endif
p->addr = addr;
p->cpu = smp_processor_id();
Powered by blists - more mailing lists