Ticket #8252: add_debug_profile.patch
File add_debug_profile.patch, 5.9 KB (added by , 12 years ago) |
---|
-
src/kits/support/BlockCache.cpp
From f17e669f8c3c99b130f9ab8e441054b719c21cbe Mon Sep 17 00:00:00 2001 From: Urias McCullough <umccullough@gmail.com> Date: Sat, 17 Dec 2011 21:53:31 -0800 Subject: [PATCH 1/2] Partial fix for DEBUG=1 build on a 64bit host --- src/kits/support/BlockCache.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/support/BlockCache.cpp b/src/kits/support/BlockCache.cpp index f35308a..b699ff5 100644
a b BBlockCache::BBlockCache(uint32 blockCount, 83 83 block->next = fFreeList; 84 84 fFreeList = block; 85 85 DEBUG_ONLY(block->magic1 = MAGIC1); 86 DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32) block->next);86 DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)(addr_t)block->next); 87 87 } 88 88 } 89 89 … … BBlockCache::~BBlockCache() 93 93 fLocker.Lock(); 94 94 while (fFreeList) { 95 95 ASSERT(fFreeList->magic1 == MAGIC1); 96 ASSERT(fFreeList->magic2 == MAGIC2 + (uint32) fFreeList->next);96 ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)(addr_t)fFreeList->next); 97 97 void *pointer = fFreeList; 98 98 fFreeList = fFreeList->next; 99 99 DEBUG_ONLY(memset(pointer, 0xCC, sizeof(_FreeBlock))); … … BBlockCache::Get(size_t blockSize) 111 111 if (blockSize == fBlockSize && fFreeList != 0) { 112 112 // we can take a block from the list 113 113 ASSERT(fFreeList->magic1 == MAGIC1); 114 ASSERT(fFreeList->magic2 == MAGIC2 + (uint32) fFreeList->next);114 ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)(addr_t)fFreeList->next); 115 115 pointer = fFreeList; 116 116 fFreeList = fFreeList->next; 117 117 fFreeBlocks--; … … BBlockCache::Save(void *pointer, size_t blockSize) 138 138 fFreeList = block; 139 139 fFreeBlocks++; 140 140 DEBUG_ONLY(block->magic1 = MAGIC1); 141 DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32) block->next);141 DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)(addr_t)block->next); 142 142 } else { 143 143 DEBUG_ONLY(memset(pointer, 0xCC, sizeof(_FreeBlock))); 144 144 fFree(pointer); -
Jamrules
-- 1.7.4.1 From 424bcc84eb9c9b76291e105fbfed1c39b5ca379d Mon Sep 17 00:00:00 2001 From: Urias McCullough <umccullough@gmail.com> Date: Sat, 17 Dec 2011 22:02:39 -0800 Subject: [PATCH 2/2] Add a debug build profile for use with Buildbot * DEBUG=1 set by default for entire tree * DEBUG=0 set for several subdirectories that gave problems (hint: these deserve attention) * Debug image size set to 650 MiB which is still a bit tight --- Jamrules | 1 + build/jam/DebugBuildProfiles | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-) create mode 100644 build/jam/DebugBuildProfiles diff --git a/Jamrules b/Jamrules index 60fb1d5..44543bc 100644
a b if ! $(HAIKU_IGNORE_USER_BUILD_CONFIG) { 76 76 } 77 77 78 78 include [ FDirName $(HAIKU_BUILD_RULES_DIR) ReleaseBuildProfiles ] ; 79 include [ FDirName $(HAIKU_BUILD_RULES_DIR) DebugBuildProfiles ] ; 79 80 80 81 # If a build profile was specified on the command line, now is the time to 81 82 # check whether it is unknown or one of the default profiles. -
new file uild/jam/DebugBuildProfiles
diff --git a/build/jam/DebugBuildProfiles b/build/jam/DebugBuildProfiles new file mode 100644 index 0000000..7c83150
- + 1 DefineBuildProfile debug : image : "haiku-debug.image" ; 2 3 switch $(HAIKU_BUILD_PROFILE) { 4 case "debug" : { 5 Echo Building Debug Image ; 6 7 # For a debug image the binaries are a little bit larger 8 HAIKU_IMAGE_SIZE = 650 ; 9 10 SetConfigVar DEBUG : HAIKU_TOP : 1 : global ; 11 12 # Targets in these subdirectories need some DEBUG love 13 SetConfigVar DEBUG : HAIKU_TOP src add-ons disk_systems bfs : 0 : local ; 14 SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers audio hda : 0 : local ; 15 SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers midi usb_midi : 0 : local ; 16 SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems btrfs : 0 : local ; 17 SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems ntfs libntfs : 0 : local ; 18 SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems udf : 0 : local ; 19 SetConfigVar DEBUG : HAIKU_TOP src add-ons mail_daemon inbound_protocols pop3 : 0 : local ; 20 SetConfigVar DEBUG : HAIKU_TOP src add-ons media media-add-ons dvb : 0 : local ; 21 SetConfigVar DEBUG : HAIKU_TOP src add-ons media media-add-ons opensound : 0 : local ; 22 SetConfigVar DEBUG : HAIKU_TOP src add-ons media plugins ffmpeg libavcodec : 0 : local ; 23 SetConfigVar DEBUG : HAIKU_TOP src add-ons media plugins ffmpeg libavcodec x86 : 0 : local ; 24 SetConfigVar DEBUG : HAIKU_TOP src add-ons media plugins ffmpeg libavformat : 0 : local ; 25 SetConfigVar DEBUG : HAIKU_TOP src add-ons media plugins ffmpeg libswscale : 0 : local ; 26 SetConfigVar DEBUG : HAIKU_TOP src add-ons print drivers gutenprint : 0 : local ; 27 SetConfigVar DEBUG : HAIKU_TOP src apps bsnow : 0 : local ; 28 SetConfigVar DEBUG : HAIKU_TOP src apps cortex addons AudioAdapter : 0 : local ; 29 SetConfigVar DEBUG : HAIKU_TOP src apps cortex NodeManager : 0 : local ; 30 SetConfigVar DEBUG : HAIKU_TOP src apps cortex TransportView : 0 : local ; 31 SetConfigVar DEBUG : HAIKU_TOP src bin coreutils src : 0 : local ; 32 SetConfigVar DEBUG : HAIKU_TOP src bin ctags : 0 : local ; 33 SetConfigVar DEBUG : HAIKU_TOP src bin network tcpdump : 0 : local ; 34 SetConfigVar DEBUG : HAIKU_TOP src libs print libgutenprint src main : 0 : local ; 35 SetConfigVar DEBUG : HAIKU_TOP src libs print libprint : 0 : local ; 36 SetConfigVar DEBUG : HAIKU_TOP src preferences mouse : 0 : local ; 37 SetConfigVar DEBUG : HAIKU_TOP src servers input : 0 : local ; 38 SetConfigVar DEBUG : HAIKU_TOP src servers media : 0 : local ; 39 SetConfigVar DEBUG : HAIKU_TOP src servers media_addon : 0 : local ; 40 SetConfigVar DEBUG : HAIKU_TOP src servers mount : 0 : local ; 41 SetConfigVar DEBUG : HAIKU_TOP src system boot loader file_systems bfs : 0 : local ; 42 SetConfigVar DEBUG : HAIKU_TOP src system boot loader file_systems tarfs : 0 : local ; 43 } 44 45 }