History

bug: completely remove code generated by disabled VM_BUG_ON()

Even if CONFIG_DEBUG_VM=n gcc genereates code for some VM_BUG_ON() for example VM_BUG_ON(!PageCompound(page) || !PageHead(page)); in do_huge_pmd_wp_page() generates 114 bytes of code. But they mostly disappears when I split this VM_BUG_ON into two: -VM_BUG_ON(!PageCompound(page) || !PageHead(page)); +VM_BUG_ON(!PageCompound(page)); +VM_BUG_ON(!PageHead(page)); weird... but anyway after this patch code disappears completely. add/remove: 0/0 grow/shrink: 7/97 up/down: 135/-1784 (-1649)

Konstantin Khlebnikov committed 14 years ago

Commit 02602a11 parent baf05aa1 file · +1 −1Browse files

Showing the changes to include (1 of 1 file). Show all

Unified · Split

include/linux/mmdebug.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4#ifdef CONFIG_DEBUG_VM4#ifdef CONFIG_DEBUG_VM
5#define VM_BUG_ON(cond) BUG_ON(cond)5#define VM_BUG_ON(cond) BUG_ON(cond)
6#else6#else
7#define VM_BUG_ON(cond) do { (void)(cond); } while (0)7#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
8#endif8#endif
9 9
10#ifdef CONFIG_DEBUG_VIRTUAL10#ifdef CONFIG_DEBUG_VIRTUAL

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t