should have never committed NOTES

git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@3777 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe
This commit is contained in:
sears 2012-02-22 23:16:02 +00:00
parent 1a172efe6b
commit a7fd806fe9

152
NOTES
View file

@ -1,152 +0,0 @@
######################################################################################
constants.h
######################################################################################
#define PAGE_SIZE 4096
#define BLOB_THRESHOLD_SIZE (PAGE_SIZE-30)
SLOT TYPES
#define INVALID_SLOT (-1)
/** This constant is used as a placeholder to mark slot locations that contain blobs.
@see slotted.c, indirect.c, blobManager.c */
#define BLOB_SLOT (-2)
#define NORMAL_SLOT (-3)
#define SLOT_TYPE_END (-4)
######################################################################################
allocationPolicy.h
######################################################################################
struct allocationPolicy {
struct LH_ENTRY(table) * xidAlloced;
struct LH_ENTRY(table) * xidDealloced;
struct RB_ENTRY(tree) * availablePages;
struct LH_ENTRY(table) * pageOwners;
struct LH_ENTRY(table) * allPages;
};
typedef struct allocationPolicy stasis_allocation_policy_t;
typedef struct availablePage {
int freespace;
pageid_t pageid;
int lockCount; // Number of active transactions that have alloced or dealloced from this page.
} availablePage;
availablePage * stasis_allocation_policy_pick_suitable_page(stasis_allocation_policy_t * ap, int xid, int freespace);
////////////////////////////////////////////////////////////////////////////////////
==15277== Thread 4:
==15277== Invalid free() / delete / delete[]
==15277== at 0x401BEFA: free (vg_replace_malloc.c:235)
==15277== by 0x4FD60FB: free_mem (in /lib/tls/libc-2.3.4.so)
==15277== by 0x4FD5B21: __libc_freeres (in /lib/tls/libc-2.3.4.so)
==15277== by 0x4017336: _vgw_freeres (vg_preloaded.c:62)
==15277== by 0x4030B25: pthread_cond_wait@@GLIBC_2.3.2 (in /lib/tls/libpthread-2.3.4.so)
==15277== by 0x402E370: start_thread (in /lib/tls/libpthread-2.3.4.so)
==15277== by 0x4F96FFD: clone (in /lib/tls/libc-2.3.4.so)
==15277== Address 0x4EC66B8 is not stack'd, malloc'd or (recently) free'd
==15277==
==15277== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 40 from 1)
==15277== malloc/free: in use at exit: 8,540,389 bytes in 912 blocks.
==15277== malloc/free: 1,815,016 allocs, 1,814,105 frees, 1,121,769,405 bytes allocated.
==15277== For counts of detected errors, rerun with: -v
==15277== searching for pointers to 912 not-freed blocks.
==15277== checked 43,383,184 bytes.
==15277==
==15277== Thread 1:
==15277==
==15277== 4,883,561 (32 direct, 4,883,529 indirect) bytes in 1 blocks are definitely lost in loss record 16 of 46
==15277== at 0x401B790: operator new(unsigned) (vg_replace_malloc.c:164)
==15277== by 0x8052C01: __gnu_cxx::new_allocator<std::_Rb_tree_node<datatuple> >::allocate(unsigned, void const*) (new_allocator.h:81)
==15277== by 0x8052B79: std::_Rb_tree<datatuple, datatuple, std::_Identity<datatuple>, datatuple, std::allocator<datatuple> >::_M_get_node() (stl_tree.h:356)
==15277== by 0x8052ACC: std::_Rb_tree<datatuple, datatuple, std::_Identity<datatuple>, datatuple, std::allocator<datatuple> >::_M_create_node(datatuple const&) (stl_tree.h:365)
==15277== by 0x8052978: std::_Rb_tree<datatuple, datatuple, std::_Identity<datatuple>, datatuple, std::allocator<datatuple> >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, datatuple const&) (stl_tree.h:783)
==15277== by 0x805270C: std::_Rb_tree<datatuple, datatuple, std::_Identity<datatuple>, datatuple, std::allocator<datatuple> >::insert_unique(datatuple const&) (stl_tree.h:881)
==15277== by 0x8052332: std::set<datatuple, datatuple, std::allocator<datatuple> >::insert(datatuple const&) (stl_set.h:314)
==15277== by 0x8050077: logtable::insertTuple(datatuple&) (logstore.cpp:1030)
==15277== by 0x804A641: insertProbeIter(int) (check_merge.cpp:160)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 336 (28 direct, 308 indirect) bytes in 1 blocks are definitely lost in loss record 17 of 46
==15277== at 0x401B405: malloc (vg_replace_malloc.c:149)
==15277== by 0x404D906: stasis_dirty_page_table_init (dirtyPageTable.c:133)
==15277== by 0x404BFA5: Tinit (transactional2.c:66)
==15277== by 0x804A2AE: insertProbeIter(int) (check_merge.cpp:97)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 40 bytes in 1 blocks are definitely lost in loss record 20 of 46
==15277== at 0x401B790: operator new(unsigned) (vg_replace_malloc.c:164)
==15277== by 0x8053025: merge_scheduler::addlogtable(logtable*) (merger.cpp:20)
==15277== by 0x804A33E: insertProbeIter(int) (check_merge.cpp:113)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 80 bytes in 10 blocks are definitely lost in loss record 32 of 46
==15277== at 0x401B405: malloc (vg_replace_malloc.c:149)
==15277== by 0x804D75E: logtree::create(int) (logstore.cpp:169)
==15277== by 0x8053BD5: memMergeThread(void*) (merger.cpp:236)
==15277== by 0x402E370: start_thread (in /lib/tls/libpthread-2.3.4.so)
==15277== by 0x4F96FFD: clone (in /lib/tls/libc-2.3.4.so)
==15277==
==15277==
==15277== 4,792 (432 direct, 4,360 indirect) bytes in 18 blocks are definitely lost in loss record 40 of 46
==15277== at 0x401B790: operator new(unsigned) (vg_replace_malloc.c:164)
==15277== by 0x80501C5: logtable::insertTuple(int, datatuple&, recordid&, logtree*) (logstore.cpp:1064)
==15277== by 0x8054FA7: insertTuple(int, DataPage<datatuple>*, datatuple&, logtable*, logtree*, recordid&, int&, int&) (merger.cpp:643)
==15277== by 0x8054AFF: merge_iterators(int, treeIterator<datatuple>*, memTreeIterator<std::set<datatuple, datatuple, std::allocator<datatuple> >, datatuple>*, logtable*, logtree*, int&) (merger.cpp:534)
==15277== by 0x8053C8F: memMergeThread(void*) (merger.cpp:251)
==15277== by 0x402E370: start_thread (in /lib/tls/libpthread-2.3.4.so)
==15277== by 0x4F96FFD: clone (in /lib/tls/libc-2.3.4.so)
==15277==
==15277==
==15277== 576 bytes in 4 blocks are possibly lost in loss record 41 of 46
==15277== at 0x401C6BF: calloc (vg_replace_malloc.c:279)
==15277== by 0x400E71A: _dl_allocate_tls (in /lib/ld-2.3.4.so)
==15277== by 0x402E91E: pthread_create@@GLIBC_2.1 (in /lib/tls/libpthread-2.3.4.so)
==15277== by 0x80538FF: merge_scheduler::startlogtable(int) (merger.cpp:184)
==15277== by 0x804A37E: insertProbeIter(int) (check_merge.cpp:116)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 3,175 bytes in 1 blocks are possibly lost in loss record 42 of 46
==15277== at 0x401B405: malloc (vg_replace_malloc.c:149)
==15277== by 0x8051BC7: DataPage<datatuple>::readbytes(int, int, int, unsigned char**) (datapage.cpp:235)
==15277== by 0x8051F7F: DataPage<datatuple>::RecordIterator::getnext(int) (datapage.cpp:442)
==15277== by 0x80512E0: DataPage<datatuple>::recordRead(int, unsigned char*, unsigned, datatuple**) (datapage.cpp:206)
==15277== by 0x8050449: logtable::findTuple(int, unsigned char*, unsigned, logtree*) (logstore.cpp:1104)
==15277== by 0x804FF48: logtable::findTuple(int, unsigned char*, unsigned) (logstore.cpp:979)
==15277== by 0x804A8D3: insertProbeIter(int) (check_merge.cpp:198)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 173,599 bytes in 2 blocks are possibly lost in loss record 43 of 46
==15277== at 0x401B405: malloc (vg_replace_malloc.c:149)
==15277== by 0x804FFD0: logtable::insertTuple(datatuple&) (logstore.cpp:1014)
==15277== by 0x804A641: insertProbeIter(int) (check_merge.cpp:160)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277==
==15277== 2,281,057 bytes in 681 blocks are definitely lost in loss record 45 of 46
==15277== at 0x401B405: malloc (vg_replace_malloc.c:149)
==15277== by 0x8051BC7: DataPage<datatuple>::readbytes(int, int, int, unsigned char**) (datapage.cpp:235)
==15277== by 0x8051F7F: DataPage<datatuple>::RecordIterator::getnext(int) (datapage.cpp:442)
==15277== by 0x80512E0: DataPage<datatuple>::recordRead(int, unsigned char*, unsigned, datatuple**) (datapage.cpp:206)
==15277== by 0x8050449: logtable::findTuple(int, unsigned char*, unsigned, logtree*) (logstore.cpp:1104)
==15277== by 0x804FF81: logtable::findTuple(int, unsigned char*, unsigned) (logstore.cpp:990)
==15277== by 0x804A8D3: insertProbeIter(int) (check_merge.cpp:198)
==15277== by 0x804AB9B: main (check_merge.cpp:235)
==15277==
==15277== LEAK SUMMARY:
==15277== definitely lost: 2,281,669 bytes in 712 blocks.
==15277== indirectly lost: 4,888,197 bytes in 150 blocks.
==15277== possibly lost: 177,350 bytes in 7 blocks.
==15277== still reachable: 1,193,173 bytes in 43 blocks.
==15277== suppressed: 0 bytes in 0 blocks.
==15277== Reachable blocks (those to which a pointer was found) are not shown.
==15277== To see them, rerun with: --show-reachable=yes
Killed