}
nvmap_stats_inc(NS_TOTAL, PAGE_ALIGN(h->orig_size));
+ nvmap_stats_inc(NS_ALLOC, PAGE_ALIGN(h->size));
trace_nvmap_alloc_handle(client, h,
h->size, heap_mask, align, flags,
- nvmap_stats_read(NS_TOTAL));
+ nvmap_stats_read(NS_TOTAL),
+ nvmap_stats_read(NS_ALLOC));
h->userflags = flags;
nr_page = ((h->size + PAGE_SIZE - 1) >> PAGE_SHIFT);
h->secure = !!(flags & NVMAP_HANDLE_SECURE);
out:
if (h->alloc) {
- nvmap_stats_inc(NS_ALLOC, h->size);
if (client->kernel_client)
nvmap_stats_inc(NS_KALLOC, h->size);
else
nvmap_stats_inc(NS_UALLOC, h->size);
} else {
nvmap_stats_dec(NS_TOTAL, PAGE_ALIGN(h->orig_size));
+ nvmap_stats_dec(NS_ALLOC, PAGE_ALIGN(h->orig_size));
}
err = (h->alloc) ? 0 : err;
u32 heap_mask,
u32 align,
u32 flags,
- u64 total
+ u64 total,
+ u64 alloc
),
- TP_ARGS(client, handle, size, heap_mask, align, flags, total),
+ TP_ARGS(client, handle, size, heap_mask, align, flags, total, alloc),
TP_STRUCT__entry(
__field(struct nvmap_client *, client)
__field(u32, align)
__field(u32, flags)
__field(u64, total)
+ __field(u64, alloc)
),
TP_fast_assign(
__entry->align = align;
__entry->flags = flags;
__entry->total = total;
+ __entry->alloc = alloc;
),
- TP_printk("client=%p, id=0x%p, size=%zu, heap_mask=0x%x, align=%d, flags=0x%x, total=%llu",
+ TP_printk("client=%p, id=0x%p, size=%zu, heap_mask=0x%x, align=%d, flags=0x%x, total=%llu, alloc=%llu",
__entry->client, __entry->handle, __entry->size,
__entry->heap_mask, __entry->align, __entry->flags,
- (unsigned long long)__entry->total)
+ (unsigned long long)__entry->total,
+ (unsigned long long)__entry->alloc)
);
TRACE_EVENT(nvmap_free_handle,