Skip to content

Commit

Permalink
scripts/tags.sh: Add Page flag function magic
Browse files Browse the repository at this point in the history
It takes a while to find the macro-magically defined Page*()
functions defined in include/linux/page-flags.h if you're new to
the kernel. Add some magic to the tags script to transform these
macros into the actual functions they are, so that tag jumping in
the mm code is a bit easier.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Stephen Boyd authored and Michal Marek committed Nov 14, 2011
1 parent 1ea6b8f commit 358142d
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions scripts/tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,28 @@ exuberant()
--regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \
--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \
--regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/' \
--regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/'
--regex-c++='/^DEFINE_EVENT\([^,)]*, *([^,)]*).*/trace_\1/' \
--regex-c++='/PAGEFLAG\(([^,)]*).*/Page\1/' \
--regex-c++='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \
--regex-c++='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \
--regex-c++='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \
--regex-c++='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \
--regex-c++='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \
--regex-c++='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \
--regex-c++='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex-c++='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex-c++='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \
--regex-c++='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
--regex-c++='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \
--regex-c++='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
--regex-c++='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \
--regex-c++='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \
--regex-c++='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex-c++='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \
--regex-c++='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \
--regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \
--regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \
--regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/'

all_kconfigs | xargs $1 -a \
--langdef=kconfig --language-force=kconfig \
Expand All @@ -154,7 +175,28 @@ emacs()
--regex='/^(ENTRY|_GLOBAL)(\([^)]*\)).*/\2/' \
--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
--regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/'
--regex='/^DEFINE_EVENT([^,)]*, *\([^,)]*\).*/trace_\1/' \
--regex='/PAGEFLAG\(([^,)]*).*/Page\1/' \
--regex='/PAGEFLAG\(([^,)]*).*/SetPage\1/' \
--regex='/PAGEFLAG\(([^,)]*).*/ClearPage\1/' \
--regex='/TESTSETFLAG\(([^,)]*).*/TestSetPage\1/' \
--regex='/TESTPAGEFLAG\(([^,)]*).*/Page\1/' \
--regex='/SETPAGEFLAG\(([^,)]*).*/SetPage\1/' \
--regex='/__SETPAGEFLAG\(([^,)]*).*/__SetPage\1/' \
--regex='/TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex='/__TESTCLEARFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex='/CLEARPAGEFLAG\(([^,)]*).*/ClearPage\1/' \
--regex='/__CLEARPAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
--regex='/__PAGEFLAG\(([^,)]*).*/__SetPage\1/' \
--regex='/__PAGEFLAG\(([^,)]*).*/__ClearPage\1/' \
--regex='/PAGEFLAG_FALSE\(([^,)]*).*/Page\1/' \
--regex='/TESTSCFLAG\(([^,)]*).*/TestSetPage\1/' \
--regex='/TESTSCFLAG\(([^,)]*).*/TestClearPage\1/' \
--regex='/SETPAGEFLAG_NOOP\(([^,)]*).*/SetPage\1/' \
--regex='/CLEARPAGEFLAG_NOOP\(([^,)]*).*/ClearPage\1/' \
--regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \
--regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \
--regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/'

all_kconfigs | xargs $1 -a \
--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
Expand Down

0 comments on commit 358142d

Please sign in to comment.