Skip to content

Instantly share code, notes, and snippets.

@takehaya
Created January 24, 2021 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takehaya/8e07656af34bc6b7b132843147f364c5 to your computer and use it in GitHub Desktop.
Save takehaya/8e07656af34bc6b7b132843147f364c5 to your computer and use it in GitHub Desktop.
trace-cmd record -p function_graph -g ip6_input
trace-cmd report
          <idle>-0     [001] 750866.352142: funcgraph_entry:                   |  ip6_input() {                                                                                                                     
          <idle>-0     [001] 750866.352143: funcgraph_entry:                   |    nf_hook_slow() {                                                                                                                
          <idle>-0     [001] 750866.352144: funcgraph_entry:                   |      ip6table_mangle_hook() {                                                                                                      
          <idle>-0     [001] 750866.352144: funcgraph_entry:                   |        ip6t_do_table() {                                                                                                           
          <idle>-0     [001] 750866.352144: funcgraph_entry:        0.345 us   |          __local_bh_enable_ip();                                                                                                   
          <idle>-0     [001] 750866.352145: funcgraph_exit:         1.171 us   |        }                                                                                                                           
          <idle>-0     [001] 750866.352145: funcgraph_exit:         1.689 us   |      }                                                                                                                             
          <idle>-0     [001] 750866.352146: funcgraph_entry:                   |      ip6table_filter_hook() {                                                                                                      
          <idle>-0     [001] 750866.352146: funcgraph_entry:                   |        ip6t_do_table() {                                                                                                           
          <idle>-0     [001] 750866.352147: funcgraph_entry:        0.299 us   |          __local_bh_enable_ip();                                                                                                   
          <idle>-0     [001] 750866.352148: funcgraph_exit:         1.488 us   |        }                                                                                                                           
          <idle>-0     [001] 750866.352148: funcgraph_exit:         2.057 us   |      }                                                                                                                             
          <idle>-0     [001] 750866.352148: funcgraph_entry:                   |      nft_do_chain_inet() {                                                                                                         
          <idle>-0     [001] 750866.352149: funcgraph_entry:        0.334 us   |        ipv6_find_hdr();                                                                                                            
          <idle>-0     [001] 750866.352149: funcgraph_entry:                   |        nft_do_chain() {                                                                                                            
          <idle>-0     [001] 750866.352150: funcgraph_entry:        0.308 us   |          nft_ct_get_eval();                                                                                                        
          <idle>-0     [001] 750866.352151: funcgraph_entry:                   |          nft_lookup_eval() {                                                                                                       
          <idle>-0     [001] 750866.352152: funcgraph_entry:        0.428 us   |            nft_hash_lookup_fast();                                                                                                 
          <idle>-0     [001] 750866.352152: funcgraph_exit:         1.565 us   |          }                                                                                                                         
          <idle>-0     [001] 750866.352153: funcgraph_entry:        0.360 us   |          nft_ct_get_eval();                                                                                                        
          <idle>-0     [001] 750866.352154: funcgraph_entry:        0.359 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352154: funcgraph_entry:        0.376 us   |          nft_cmp_eval();                                                                                                           
          <idle>-0     [001] 750866.352155: funcgraph_entry:        0.354 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352156: funcgraph_entry:        0.590 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352157: funcgraph_entry:        0.331 us   |          nft_cmp_eval();                                                                                                           
          <idle>-0     [001] 750866.352157: funcgraph_entry:        0.349 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352158: funcgraph_entry:        0.410 us   |          nft_cmp_eval();                                                                                                           
          <idle>-0     [001] 750866.352159: funcgraph_entry:        0.297 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352160: funcgraph_entry:        0.297 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352160: funcgraph_entry:        0.301 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352161: funcgraph_entry:        0.414 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352162: funcgraph_entry:        0.384 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352163: funcgraph_entry:        0.308 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352163: funcgraph_entry:                   |          nft_payload_eval() {                                                                                                      
          <idle>-0     [001] 750866.352164: funcgraph_entry:        0.311 us   |            skb_copy_bits();                                                                                                        
          <idle>-0     [001] 750866.352165: funcgraph_exit:         1.040 us   |          }
          <idle>-0     [001] 750866.352165: funcgraph_entry:        0.404 us   |          nft_bitwise_eval();                                                                                                       
          <idle>-0     [001] 750866.352166: funcgraph_entry:        0.301 us   |          nft_cmp_eval();                                                                                                           
          <idle>-0     [001] 750866.352167: funcgraph_entry:        0.309 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352168: funcgraph_entry:        0.473 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352169: funcgraph_entry:        0.307 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352169: funcgraph_entry:        0.270 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352170: funcgraph_entry:        0.397 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352171: funcgraph_entry:        0.341 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352171: funcgraph_entry:                   |          nft_payload_eval() {                                                                                                      
          <idle>-0     [001] 750866.352172: funcgraph_entry:        0.443 us   |            skb_copy_bits();                                                                                                        
          <idle>-0     [001] 750866.352172: funcgraph_exit:         1.033 us   |          }                                                                                                                         
          <idle>-0     [001] 750866.352173: funcgraph_entry:        0.272 us   |          nft_cmp_eval();                                                                                                           
          <idle>-0     [001] 750866.352173: funcgraph_entry:        0.273 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352174: funcgraph_entry:        0.427 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352175: funcgraph_entry:        0.380 us   |          nft_immediate_eval();                                                                                                     
          <idle>-0     [001] 750866.352176: funcgraph_entry:        0.276 us   |          nft_meta_get_eval();                                                                                                      
          <idle>-0     [001] 750866.352176: funcgraph_entry:                   |          nft_lookup_eval() {                                                                                                       
          <idle>-0     [001] 750866.352177: funcgraph_entry:        0.267 us   |            nft_bitmap_lookup();                                                                                                    
          <idle>-0     [001] 750866.352177: funcgraph_exit:         1.061 us   |          }                                                                                                                         
          <idle>-0     [001] 750866.352178: funcgraph_entry:        0.271 us   |          nft_ct_get_eval();                                                                                                        
          <idle>-0     [001] 750866.352178: funcgraph_entry:                   |          nft_lookup_eval() {                                                                                                       
          <idle>-0     [001] 750866.352179: funcgraph_entry:        0.330 us   |            nft_hash_lookup_fast();                                                                                                 
          <idle>-0     [001] 750866.352179: funcgraph_exit:         0.963 us   |          }                                                                                                                         
          <idle>-0     [001] 750866.352180: funcgraph_entry:                   |          nft_reject_inet_eval() {                                                                                                  
          <idle>-0     [001] 750866.352180: funcgraph_entry:        0.416 us   |            nft_reject_icmpv6_code();                                                                                               
          <idle>-0     [001] 750866.352181: funcgraph_entry:                   |            nf_send_unreach6() {                                                                                                    
          <idle>-0     [001] 750866.352182: funcgraph_entry:        0.372 us   |              ipv6_skip_exthdr();                                                                                                   
          <idle>-0     [001] 750866.352182: funcgraph_entry:                   |              nf_ip6_checksum() {                                                                                                   
          <idle>-0     [001] 750866.352183: funcgraph_entry:                   |                skb_checksum() {                                                                                                    
          <idle>-0     [001] 750866.352183: funcgraph_entry:                   |                  __skb_checksum() {                                                                                                
          <idle>-0     [001] 750866.352183: funcgraph_entry:                   |                    csum_partial() {                                                                                                
          <idle>-0     [001] 750866.352184: funcgraph_entry:        0.296 us   |                      do_csum();                                                                                                    
          <idle>-0     [001] 750866.352184: funcgraph_exit:         0.863 us   |                    }                                                                                                               
          <idle>-0     [001] 750866.352184: funcgraph_exit:         1.490 us   |                  }                                                                                                                 
          <idle>-0     [001] 750866.352185: funcgraph_exit:         2.057 us   |                }                                                                                                                   
          <idle>-0     [001] 750866.352185: funcgraph_entry:        0.270 us   |                csum_ipv6_magic();
          <idle>-0     [001] 750866.352185: funcgraph_entry:                   |                __skb_checksum_complete() {
          <idle>-0     [001] 750866.352186: funcgraph_entry:                   |                  __skb_checksum() {
          <idle>-0     [001] 750866.352186: funcgraph_entry:                   |                    csum_partial() {
          <idle>-0     [001] 750866.352186: funcgraph_entry:        0.375 us   |                      do_csum();
          <idle>-0     [001] 750866.352187: funcgraph_exit:         0.904 us   |                    }
          <idle>-0     [001] 750866.352187: funcgraph_exit:         1.424 us   |                  }
          <idle>-0     [001] 750866.352187: funcgraph_exit:         1.967 us   |                }
          <idle>-0     [001] 750866.352188: funcgraph_exit:         5.574 us   |              }
          <idle>-0     [001] 750866.352188: funcgraph_exit:         6.771 us   |            }
          <idle>-0     [001] 750866.352188: funcgraph_exit:         8.491 us   |          }
          <idle>-0     [001] 750866.352189: funcgraph_exit:       + 39.415 us  |        }
          <idle>-0     [001] 750866.352189: funcgraph_exit:       + 40.567 us  |      }
          <idle>-0     [001] 750866.352189: funcgraph_entry:                   |      kfree_skb() {
          <idle>-0     [001] 750866.352190: funcgraph_entry:                   |        skb_release_head_state() {
          <idle>-0     [001] 750866.352190: funcgraph_entry:                   |          nf_conntrack_destroy() {
          <idle>-0     [001] 750866.352190: funcgraph_entry:                   |            destroy_conntrack() {
          <idle>-0     [001] 750866.352191: funcgraph_entry:        0.328 us   |              nf_ct_remove_expectations();
          <idle>-0     [001] 750866.352191: funcgraph_entry:                   |              nf_ct_del_from_dying_or_unconfirmed_list() {
          <idle>-0     [001] 750866.352192: funcgraph_entry:        0.272 us   |                _raw_spin_lock();
          <idle>-0     [001] 750866.352192: funcgraph_exit:         0.854 us   |              }
          <idle>-0     [001] 750866.352192: funcgraph_entry:        0.266 us   |              __local_bh_enable_ip();
          <idle>-0     [001] 750866.352193: funcgraph_entry:                   |              nf_conntrack_free() {
          <idle>-0     [001] 750866.352193: funcgraph_entry:                   |                nf_ct_ext_destroy() {
          <idle>-0     [001] 750866.352194: funcgraph_entry:        0.271 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352194: funcgraph_entry:        0.268 us   |                  nf_nat_cleanup_conntrack();
          <idle>-0     [001] 750866.352195: funcgraph_entry:        0.267 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352196: funcgraph_entry:        0.269 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352196: funcgraph_entry:        0.270 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352197: funcgraph_entry:        0.265 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352197: funcgraph_entry:        0.265 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352198: funcgraph_entry:        0.263 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352198: funcgraph_entry:        0.269 us   |                  rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352199: funcgraph_entry:        0.625 us   |                  kfree();
          <idle>-0     [001] 750866.352199: funcgraph_exit:         6.203 us   |                }
          <idle>-0     [001] 750866.352200: funcgraph_entry:        0.717 us   |                kmem_cache_free();
          <idle>-0     [001] 750866.352201: funcgraph_exit:         7.810 us   |              }
          <idle>-0     [001] 750866.352201: funcgraph_exit:       + 10.655 us  |            }
          <idle>-0     [001] 750866.352201: funcgraph_entry:        0.268 us   |            rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352202: funcgraph_exit:       + 11.858 us  |          }
          <idle>-0     [001] 750866.352202: funcgraph_exit:       + 12.596 us  |        }
          <idle>-0     [001] 750866.352202: funcgraph_entry:                   |        skb_release_data() {
          <idle>-0     [001] 750866.352203: funcgraph_entry:        0.289 us   |          page_frag_free();
          <idle>-0     [001] 750866.352203: funcgraph_exit:         0.972 us   |        }
          <idle>-0     [001] 750866.352204: funcgraph_entry:                   |        kfree_skbmem() {
          <idle>-0     [001] 750866.352204: funcgraph_entry:        1.051 us   |          kmem_cache_free();
          <idle>-0     [001] 750866.352205: funcgraph_exit:         1.599 us   |        }
          <idle>-0     [001] 750866.352206: funcgraph_exit:       + 16.289 us  |      }
          <idle>-0     [001] 750866.352206: funcgraph_exit:       + 62.563 us  |    }
          <idle>-0     [001] 750866.352206: funcgraph_entry:        0.272 us   |    rcu_read_unlock_strict();
          <idle>-0     [001] 750866.352207: funcgraph_exit:       + 65.186 us  |  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment