Fix some tabs. Add optional messsage to dump. Some minor format change to dump function.
This commit was SVN r29208.
Этот коммит содержится в:
родитель
273d66d0f2
Коммит
c9a33fad83
@ -55,7 +55,7 @@ typedef int (*mca_rcache_base_module_clean_fn_t)(
|
||||
struct mca_rcache_base_module_t* rcache);
|
||||
|
||||
typedef void (*mca_rcache_base_module_dump_range_fn_t)(
|
||||
struct mca_rcache_base_module_t* rcache, unsigned char* addr, size_t size);
|
||||
struct mca_rcache_base_module_t* rcache, unsigned char* addr, size_t size, char *msg);
|
||||
|
||||
/**
|
||||
* finalize
|
||||
|
@ -174,8 +174,8 @@ void mca_rcache_vma_finalize(struct mca_rcache_base_module_t* rcache)
|
||||
}
|
||||
|
||||
void mca_rcache_vma_dump_range(struct mca_rcache_base_module_t* rcache,
|
||||
unsigned char *base, size_t size)
|
||||
unsigned char *base, size_t size, char *msg)
|
||||
{
|
||||
mca_rcache_vma_module_t *vma_rcache = (struct mca_rcache_vma_module_t*) rcache;
|
||||
mca_rcache_vma_tree_dump_range(vma_rcache, base, size);
|
||||
mca_rcache_vma_tree_dump_range(vma_rcache, base, size, msg);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void mca_rcache_vma_module_init(mca_rcache_vma_module_t *rcache);
|
||||
void mca_rcache_vma_finalize(struct mca_rcache_base_module_t*);
|
||||
|
||||
void mca_rcache_vma_dump_range(struct mca_rcache_base_module_t *rcache,
|
||||
unsigned char* addr, size_t size);
|
||||
unsigned char* addr, size_t size, char *msg);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
@ -535,17 +535,22 @@ int mca_rcache_vma_tree_delete(mca_rcache_vma_module_t* vma_rcache,
|
||||
|
||||
/* Dump out rcache entries within a range of memory. Useful for debugging. */
|
||||
void mca_rcache_vma_tree_dump_range(mca_rcache_vma_module_t *vma_rcache,
|
||||
unsigned char *base, size_t size)
|
||||
unsigned char *base, size_t size, char *msg)
|
||||
{
|
||||
unsigned char * bound = base + size -1;
|
||||
mca_mpool_base_registration_t *reg;
|
||||
|
||||
if (NULL == msg) {
|
||||
msg = "";
|
||||
}
|
||||
|
||||
opal_output(0, "Dumping rcache entries: %s", msg);
|
||||
|
||||
if(opal_list_get_size(&vma_rcache->vma_list) == 0) {
|
||||
opal_output(0, "rcache is empty");
|
||||
opal_output(0, " rcache is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
opal_output(0, "Dumping rcache entries");
|
||||
do {
|
||||
mca_rcache_vma_t *vma;
|
||||
opal_list_item_t *item;
|
||||
@ -563,16 +568,17 @@ void mca_rcache_vma_tree_dump_range(mca_rcache_vma_module_t *vma_rcache,
|
||||
continue;
|
||||
}
|
||||
|
||||
opal_output(0, " vma: base=%p, bound=%p, size=%d", (void *)vma->start, (void *)vma->end,
|
||||
(int)(vma->end - vma->start + 1));
|
||||
opal_output(0, " vma: base=%p, bound=%p, size=%d, number of registrations=%d",
|
||||
(void *)vma->start, (void *)vma->end, (int)(vma->end - vma->start + 1),
|
||||
(int)opal_list_get_size(&vma->reg_list));
|
||||
for(item = opal_list_get_first(&vma->reg_list);
|
||||
item != opal_list_get_end(&vma->reg_list);
|
||||
item = opal_list_get_next(item)) {
|
||||
mca_rcache_vma_reg_list_item_t *vma_item;
|
||||
vma_item = (mca_rcache_vma_reg_list_item_t*)item;
|
||||
reg = vma_item->reg;
|
||||
opal_output(0, " reg: base=%p, bound=%p, alloc_base=%p, ref_count=%d, flags=0x%x",
|
||||
reg->base, reg->bound, reg->alloc_base, reg->ref_count, reg->flags);
|
||||
opal_output(0, " reg: base=%p, bound=%p, alloc_base=%p, ref_count=%d, flags=0x%x",
|
||||
reg->base, reg->bound, reg->alloc_base, reg->ref_count, reg->flags);
|
||||
}
|
||||
base = (unsigned char *)vma->end + 1;
|
||||
} while(bound >= base);
|
||||
|
@ -103,7 +103,7 @@ void mca_rcache_vma_destroy(mca_rcache_vma_t *vma);
|
||||
* Dump out the contents of the rcache for debugging.
|
||||
*/
|
||||
void mca_rcache_vma_tree_dump_range(mca_rcache_vma_module_t *vma_rcache,
|
||||
unsigned char *base, size_t size);
|
||||
unsigned char *base, size_t size, char *msg);
|
||||
|
||||
|
||||
#endif /* MCA_RCACHE_VMA_TREE_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user