Revert "ANDROID: Add dmabuf RSS trace event"

Revert submission 3680024

Reason for revert: replacing with a fixed version

Reverted changes: /q/submissionid:3680024

Bug: 430499939
Change-Id: I5ba5cdbabd1e967889b3523abca289fa8e8a3ec9
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
Suren Baghdasaryan
2025-07-09 16:52:30 -07:00
parent a9597c7b32
commit 1f02134847
2 changed files with 0 additions and 30 deletions

View File

@@ -31,9 +31,6 @@
#include <uapi/linux/dma-buf.h>
#include <uapi/linux/magic.h>
#ifndef __GENKSYMS__
#include <trace/events/kmem.h>
#endif
#include <trace/hooks/dmabuf.h>
#include "dma-buf-sysfs-stats.h"
@@ -214,7 +211,6 @@ static int new_task_dmabuf_record(struct task_struct *task, struct dma_buf *dmab
return -ENOMEM;
dmabuf_info->rss += dmabuf->size;
trace_dmabuf_rss_stat(dmabuf_info->rss, dmabuf->size, dmabuf);
/*
* dmabuf_info->lock protects against concurrent writers, so no
* worries about stale rss_hwm between the read and write, and we don't
@@ -316,7 +312,6 @@ void dma_buf_unaccount_task(struct dma_buf *dmabuf, struct task_struct *task)
list_del(&rec->node);
kfree(rec);
dmabuf_info->rss -= dmabuf->size;
trace_dmabuf_rss_stat(dmabuf_info->rss, -dmabuf->size, dmabuf);
atomic64_dec(&get_dmabuf_ext(dmabuf)->num_unique_refs);
}
err:

View File

@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <linux/tracepoint.h>
#include <trace/events/mmflags.h>
#include <linux/dma-buf.h>
TRACE_EVENT(kmem_cache_alloc,
@@ -488,30 +487,6 @@ TRACE_EVENT(rss_stat,
__print_symbolic(__entry->member, TRACE_MM_PAGES),
__entry->size)
);
TRACE_EVENT(dmabuf_rss_stat,
TP_PROTO(size_t rss, ssize_t rss_delta, struct dma_buf *dmabuf),
TP_ARGS(rss, rss_delta, dmabuf),
TP_STRUCT__entry(
__field(size_t, rss)
__field(ssize_t, rss_delta)
__field(unsigned long, i_ino)
),
TP_fast_assign(
__entry->rss = rss;
__entry->rss_delta = rss_delta;
__entry->i_ino = file_inode(dmabuf->file)->i_ino;
),
TP_printk("rss=%zu delta=%zd i_ino=%lu",
__entry->rss,
__entry->rss_delta,
__entry->i_ino)
);
#endif /* _TRACE_KMEM_H */
/* This part must be outside protection */