Skip to content

Remove prof_threshold built-in event#71

Open
spredolac wants to merge 1 commit intofacebook:devfrom
spredolac:event_cleanup
Open

Remove prof_threshold built-in event#71
spredolac wants to merge 1 commit intofacebook:devfrom
spredolac:event_cleanup

Conversation

@spredolac
Copy link

Remove prof_threshold built-in event. It is simple to implement it as user event when needed. For example,

   void onMemoryThresholdHook(bool /*is_alloc*/, uint64_t alloc, uint64_t dealloc) {
        ...
   }
    
   static struct {
     void (*callback)(bool, uint64_t, uint64_t);
     uint64_t interval;
     bool is_alloc_only;
   } uobj = {
       .callback = &onMemoryThresholdHook,
       .interval = 128 * 1024ULL * 1024ULL,
       .is_alloc_only = true, // Only fire for allocation events
   };
   int err = mallctl("experimental.hooks.thread_event", NULL, NULL, &uobj, sizeof(uobj));
   ```
   
   so there is no need to keep this one in. 
   
   

@meta-cla meta-cla bot added the cla signed label Feb 13, 2026
@spredolac spredolac added the cleanup PRs cleaning/refactoring the codebase label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed cleanup PRs cleaning/refactoring the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant