summaryrefslogtreecommitdiff
path: root/tools/lib/lockdep
AgeCommit message (Collapse)Author
2014-04-01tools/liblockdep: Add proper versioning to the shared objSasha Levin
Add proper versioning to the shared obj so that distros would be able to ship this lib without having to worry about versioning. Suggested-by: Josh Boyer <jwboyer@fedoraproject.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-04-01tools/liblockdep: Ignore asmlinkage and visibleSasha Levin
Commit 63f9a7fde7 "asmlinkage: Make lockdep_sys_exit asmlinkage" has added asmlinkage annotation to lockdep_sys_exit, which broke build of liblockdep. Since we don't need asmlinkage in liblockep, just ignore it. Reported-by: Eunbong Song <eunb.song@samsung.com> Reported-by: Robin Hack <rhack@redhat.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Use realpath for srctree and objtreeWang Nan
If BUILD_SRC or CURDIR contains tailing '/', the file names passed to gcc will contain '//'. It will be contained .o's in debuginfo, then confuse debugedit: https://bugzilla.redhat.com/show_bug.cgi?id=304121 This patch uses realpath command to makesure potential tailing '/'s are removed. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Geng Hui <hui.geng@huawei.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Add a stub for new rcu_is_watchingSasha Levin
Stub out rcu_is_watching(), prevents build error with the updated tree. Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Mark runtests.sh as executableSasha Levin
runtests.sh is used to run the sanity tests for liblockdep and should be set +x. Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Add include directory to allow tests to compileIra W. Snyder
All of the programs in the tests directory require the liblockdep/mutex.h header in order to compile. Add the include directory to the compiler options so that the tests can be built with the provided Makefile. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Fix include of asm/hash.hIra W. Snyder
Commit 71ae8aac ("lib: introduce arch optimized hash library") added an include to <linux/hash.h> for setting up an architecture specific fast hash. This patch mirrors the fix used for perf, titled "tools: perf: util: fix include for non x86 architectures". Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2014-02-26tools/liblockdep: Fix initialization code pathIra W. Snyder
This makes initialization actually happen. Without it, initialization is always skipped due to an incorrect conditional statement. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2013-11-27liblockdep: Add the 'lockdep' user-space utilitySasha Levin
This is a simple wrapper to make using liblockdep on existing applications much easier. After running 'make && make install', it becomes quite simple to test things with liblockdep. For example, to try it on perf: lockdep perf No other integration required. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-9-git-send-email-sasha.levin@oracle.com [ Changed it to load ./liblockdep.so, so it can be tested in situ. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Support using LD_PRELOADSasha Levin
This allows lockdep to be used without being compiled in the original program. Usage is quite simple: LD_PRELOAD=/path/to/liblockdep.so /path/to/my/program And magically, you'll have lockdep checking in your program! Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-8-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Add pthread_rwlock_t test suiteSasha Levin
A simple test to make sure we handle rwlocks correctly. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-7-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Add public headers for pthread_rwlock_t implementationSasha Levin
Both pthreads and lockdep support dealing with rwlocks, so here's the liblockdep implementation for those. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-6-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Add pthread_mutex_t test suiteSasha Levin
This is a rather simple and basic test suite to test common locking issues. Beyond tests, it also shows how to use the library. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-5-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Add public headers for pthread_mutex_t implementationSasha Levin
These headers provide the same API as their pthread mutex counterparts. The design here is to allow to easily switch to liblockdep lock validation just by adding a "liblockdep_" to pthread_mutex_*() calls, which means that it's easy to integrate liblockdep into existing codebases. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-4-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-11-27liblockdep: Wrap kernel/locking/lockdep.c to allow usage from userspaceSasha Levin
kernel/locking/lockdep.c deals with validating locking scenarios for various architectures supported by the kernel. There isn't anything kernel specific going on in lockdep, and when we compare userspace to other architectures that don't have to deal with irqs such as s390, they become all too similar. We wrap kernel/locking/lockdep.c and include/linux/lockdep.h with several headers which allow us to build and use lockdep from userspace. We don't touch the kernel code itself which means that any work done on lockdep in the kernel will automatically benefit userspace lockdep as well! Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: torvalds@linux-foundation.org Link: http://lkml.kernel.org/r/1371163284-6346-3-git-send-email-sasha.levin@oracle.com Signed-off-by: Ingo Molnar <mingo@kernel.org>