Skip to content

Remove prof_threshold built-in event#71

Merged
guangli-dai merged 1 commit intofacebook:devfrom
spredolac:event_cleanup
Feb 25, 2026
Merged

Remove prof_threshold built-in event#71
guangli-dai merged 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
@guangli-dai guangli-dai merged commit 7bf49ca into facebook:dev Feb 25, 2026
155 of 156 checks passed
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.

2 participants