Ubuntu Pastebin

Paste from nborisov at Wed, 17 May 2017 07:34:59 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
global ts, hist                                                                 
                                                                                
probe kernel.function("reserve_metadata_bytes") {                               
    ts[tid()] = gettimeofday_ms();                                              
}                                                                               
                                                                                
probe kernel.function("reserve_metadata_bytes").return {                        
    if (ts[tid()]) {                                                            
        hist <<< gettimeofday_ms() - ts[tid()];                                 
        delete ts[tid()];                                                       
    }                                                                           
}                                                                               
                                                                                
probe end {                                                                     
                                                                                
    print(@hist_log(hist));                                                     
                                                                                
}
Download as text