facebookincubator / dynolog

Dynolog is a telemetry daemon for performance monitoring and tracing. It exports metrics from different components in the system like the linux kernel, CPU, disks, Intel PT, GPUs etc. Dynolog also integrates with pytorch and can trigger traces for distributed training applications.
MIT License
187 stars 34 forks source link

musl: __u64 not defined #230

Closed atupone closed 3 months ago

atupone commented 3 months ago

https://bugs.gentoo.org/925905

struct stat field is defined as a ino_t, at least looking at man 3type stat

facebook-github-bot commented 3 months ago

@bigzachattack has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

bigzachattack commented 3 months ago

@atupone Can you modify mapFdWrapperPtrIntoInode in BPerfEventsGroup.cpp to use the ino_t as well? Here is an idea I put together:

diff --git a/hbt/src/perf_event/BPerfEventsGroup.cpp b/fbcode/hbt/src/perf_event/BPerfEventsGroup.cpp
--- a/hbt/src/perf_event/BPerfEventsGroup.cpp
+++ b/hbt/src/perf_event/BPerfEventsGroup.cpp
@@ -90,10 +90,10 @@
           name,
           metric.makeNoCpuTopologyConfs(pmu_manager),
           cgroup_update_level) {}
-inline auto mapFdWrapperPtrIntoInode(
+inline ino_t mapFdWrapperPtrIntoInode(
     const std::shared_ptr<FdWrapper>& fd_wrapper) {
   if (fd_wrapper == nullptr) {
-    return 0ull;
+    return (ino_t)0;
   }
   return fd_wrapper->getInode();
 }
facebook-github-bot commented 3 months ago

@bigzachattack has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 3 months ago

@bigzachattack merged this pull request in facebookincubator/dynolog@2ca6a69b1b5ede52e8c369525c49b7f4c902781d.