diff options
| author | Kalesh Singh <kaleshsingh@google.com> | 2021-07-08 22:02:04 +0000 |
|---|---|---|
| committer | Kalesh Singh <kaleshsingh@google.com> | 2021-07-14 21:15:26 +0000 |
| commit | 87b63e5cbcb57eca72b79929ff067cdacb0b37c4 (patch) | |
| tree | a894c40f2e7bc37462960dda83e47e607133e08a /libdmabufinfo | |
| parent | 99fdf80131213afa66e934ee676a027ae2b47428 (diff) | |
| download | platform_system_memory_libmeminfo-87b63e5cbcb57eca72b79929ff067cdacb0b37c4.tar.gz platform_system_memory_libmeminfo-87b63e5cbcb57eca72b79929ff067cdacb0b37c4.tar.bz2 platform_system_memory_libmeminfo-87b63e5cbcb57eca72b79929ff067cdacb0b37c4.zip | |
dmabuf_dump: Remove per-device and attachment stats
Creating a separate sysfs directory for each dmabuf attachment
adds overhead that is quite significant in some fast paths.
Attachment stats are being removed from dmabuf sysfs stats
Remove the per-device and attachment stats from dmabuf_dump
Bug: 193226716
Bug: 193465681
Bug: 192621117
Test: dmabuf_dump -b
Change-Id: If3a67c07e8c013d76fe158f4a0260f1ec4153391
Diffstat (limited to 'libdmabufinfo')
| -rw-r--r-- | libdmabufinfo/tools/dmabuf_dump.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libdmabufinfo/tools/dmabuf_dump.cpp b/libdmabufinfo/tools/dmabuf_dump.cpp index 2466e78..57204f6 100644 --- a/libdmabufinfo/tools/dmabuf_dump.cpp +++ b/libdmabufinfo/tools/dmabuf_dump.cpp @@ -228,7 +228,6 @@ static void DumpDmabufSysfsStats() { auto buffer_stats = stats.buffer_stats(); auto exporter_stats = stats.exporter_info(); - auto importer_stats = stats.importer_info(); printf("\n\n----------------------- DMA-BUF per-buffer stats -----------------------\n"); printf(" Dmabuf Inode | Size(bytes) | Exporter Name |\n"); @@ -236,21 +235,6 @@ static void DumpDmabufSysfsStats() { printf("%16u |%16u | %16s \n", buf.inode, buf.size, buf.exp_name.c_str()); } - printf("\n\n----------------------- DMA-BUF attachment stats -----------------------\n"); - printf(" Dmabuf Inode | Attachment(Map Count)\n"); - for (const auto& buf : buffer_stats) { - printf("%16u", buf.inode); - - if (buf.attachments.empty()) { - printf(" None\n"); - continue; - } - - for (const auto& attachment : buf.attachments) - printf("%20s(%u) ", attachment.device.c_str(), attachment.map_count); - printf("\n"); - } - printf("\n\n----------------------- DMA-BUF exporter stats -----------------------\n"); printf(" Exporter Name | Total Count | Total Size(bytes) |\n"); for (const auto& it : exporter_stats) { @@ -258,15 +242,6 @@ static void DumpDmabufSysfsStats() { it.second.size); } - if (!importer_stats.empty()) { - printf("\n\n---------------------- DMA-BUF per-device stats ----------------------\n"); - printf(" Device | Total Count | Total Size(bytes) |\n"); - for (const auto& it : importer_stats) { - printf("%32s | %12u| %" PRIu64 "\n", it.first.c_str(), it.second.buffer_count, - it.second.size); - } - } - printf("\n\n----------------------- DMA-BUF total stats --------------------------\n"); printf("Total DMA-BUF count: %u, Total DMA-BUF size(bytes): %" PRIu64 "\n", stats.total_count(), stats.total_size()); |
