mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
rk: ion: more debug info
This commit is contained in:
@@ -681,14 +681,16 @@ static int ion_debug_client_show_buffer(struct seq_file *s, void *unused)
|
||||
size_t len;
|
||||
|
||||
seq_printf(s, "----------------------------------------------------\n");
|
||||
seq_printf(s, "%16.s: %12.s %8.s %4.s %4.s %4.s\n", "heap_name", "addr", "size", "HC", "IBR", "IHR");
|
||||
mutex_lock(&client->lock);
|
||||
for (n = rb_first(&client->handles); n; n = rb_next(n)) {
|
||||
struct ion_handle *handle = rb_entry(n, struct ion_handle, node);
|
||||
struct ion_buffer *buffer = handle->buffer;
|
||||
if (buffer->heap->ops->phys) {
|
||||
buffer->heap->ops->phys(buffer->heap, buffer, &addr, &len);
|
||||
seq_printf(s, "%16.16s: 0x%08lX %8zuKB %d\n",
|
||||
buffer->heap->name, addr, len>>10, buffer->handle_count);
|
||||
seq_printf(s, "%16.16s: 0x%08lx %8zuKB %4d %4d %4d\n",
|
||||
buffer->heap->name, addr, len>>10, buffer->handle_count,
|
||||
atomic_read(&buffer->ref.refcount), atomic_read(&handle->ref.refcount));
|
||||
}
|
||||
}
|
||||
mutex_unlock(&client->lock);
|
||||
|
||||
@@ -192,7 +192,7 @@ static int ion_cma_heap_debug_show(struct ion_heap *heap, struct seq_file *s,
|
||||
seq_printf(s, "Heap bitmap:\n");
|
||||
|
||||
for(i = rows - 1; i>= 0; i--){
|
||||
seq_printf(s, "%.4uM@0x%08X: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
|
||||
seq_printf(s, "%.4uM@0x%08x: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
|
||||
i+1, base+(i)*SZ_1M,
|
||||
cma->bitmap[i*8 + 7],
|
||||
cma->bitmap[i*8 + 6],
|
||||
@@ -203,7 +203,7 @@ static int ion_cma_heap_debug_show(struct ion_heap *heap, struct seq_file *s,
|
||||
cma->bitmap[i*8 + 1],
|
||||
cma->bitmap[i*8]);
|
||||
}
|
||||
seq_printf(s, "Heap size: %luM, Heap base: 0x%08X\n",
|
||||
seq_printf(s, "Heap size: %luM, Heap base: 0x%08x\n",
|
||||
(cma->count)>>8, base);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user