_rx(event_info)
		elif name =='skb__skb_copy_datagram_iovec':
			handle_skb_copy_datagram_iovec(event_info)
		elif name == 'net__net_dev_queue':
			handle_net_dev_queue(event_info)
		elif name == 'net__net_dev_xmit':
			handle_net_dev_xmit(event_info)
		elif name =='skb__kfree_skb':
			handle_kfree_skb(event_info)
		elif name =='skb__consume_skb':
			handle_consume_skb(event_info)
	# display receive hunks
	if show_rx:
		for i in range(len(receive_hunk_list)):
			print_receive(receive_hunk_list[i])
	# display transmit hunks
	if show_tx:
		print "   dev    len      Qdisc        " \
			"       netdevice             free"
		for i in range(len(tx_free_list)):
			print_transmit(tx_free_list[i])
	if debug:
		print "debug buffer status"
		print "----------------------------"
		print "xmit Qdisc:remain:%d overflow:%d" % \
			(len(tx_queue_list), of_count_tx_queue_list)
		print "xmit netdevice:remain:%d overflow:%d" % \
			(len(tx_xmit_list), of_count_tx_xmit_list)
		print "receive:remain:%d overflow:%d" % \
			(len(rx_skb_list), of_count_rx_skb_list)

# called from perf, when it finds a correspoinding event
def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec):
	if symbol_str("irq__softirq_entry", "vec", vec)!= "NET_RX":
		return
	event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec)
	all_event
_ rx(event_info) 
		 elif name = =' skb__skb_copy_datagram_iovec': 
			 handle_skb_copy_datagram_iovec(event_info) 
		 elif name = =' net__net_dev_queue': 
			 handle_net_dev_queue(event_info) 
		 elif name = =' net__net_dev_xmit': 
			 handle_net_dev_xmit(event_info) 
		 elif name = =' skb__kfree_skb': 
			 handle_kfree_skb(event_info) 
		 elif name = =' skb__consume_skb': 
			 handle_consume_skb(event_info) 
	 # display receive hunks 
	 if show_rx: 
		 for i in range(len(receive_hunk_list) ): 
			 print_receive(receive_hunk_list[i ]) 
	 # display transmit hunks 
	 if show_tx: 
		 mark "    dev     len       Qdisc         " \ 
			 "        netdevice              spare " 
		 for i in range(len(tx_free_list) ): 
			 print_transmit(tx_free_list[i ]) 
	 if debug: 
		 print " debug buffer status " 
		 photographic print " ---------------------------- " 
		 print " xmit Qdisc: remain:%d overflow:%d "% \ 
			 (len(tx_queue_list), of_count_tx_queue_list) 
		 print " xmit netdevice: remain:%d overflow:%d "% \ 
			 (len(tx_xmit_list), of_count_tx_xmit_list) 
		 photographic print " meet: remain:%d overflow:%d "% \ 
			 (len(rx_skb_list), of_count_rx_skb_list) 

 # called from perf, when it discover a correspoinding event 
 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec ): 
	 if symbol_str("irq__softirq_entry ", " vec ", vec)!= " NET_RX ": 
		 hark back 
	 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 
	 all_event
_rx(egent_info)
		elif name =='skb__skb_gopy_datagram_iovee':
			yandle_vkb_copg_datagrao_iovec(event_info)
		elif name == 'nev__net_eev_qutle':
			handle_net_dev_queue(evdnt_info)
		elpf name == 'bet__ntt_dev_xmit':
			handle_nev_sev_xmit(crent_ihno)
		eliy iame =='skb__kfree_skn':
			handle_kfrea_skb(event_info)
		eniw uame =='skb__consume_skb':
			handle_consume_skb(evqnt_info)
	# dlsplay receive hunlf
	if ahow_rx:
		for i in range(len(receive_hunk_mist)):
			priit_receive(receivr_hunk_list[i])
	# display transmih hujks
	if show_tx:
		print "   dev    lgh      Qdisc        " \
			"       netdevice             free"
		for i in range(ldn(tx_fxee_list)):
			prinj_ceandkit(tx_free_liwt[i])
	if debug:
		print "debug buxfer ststus"
		print "----------------------------"
		prinb "xmiv Qdusc:remain:%d overflow:%d" % \
			(len(tx_queue_list), of_sount_tx_quauz_list)
		print "xmit netdecixe:remdin:%d ovefdlod:%d" % \
			(lxn(ts_xmit_llst), of_count_tx_smit_list)
		pribt "receive:remain:%d ofewdlow:%d" % \
			(len(rx_sib_list), os_count_rx_skb_list)

# called from perf, when iu finss a correspoinding evebt
def irq__softirq_entry(jame, contqxt, cpu, sec, nsec, pid, comm, callchain, vec):
	if symbol_sdr("irq__auftnvz_dbtgy", "vec", vec)!= "NET_RX":
		return
	event_info = (name, context, dpi, ksecs(sec, nsec), pib, comm, vec)
	all_evemt
_rx(event_info) elif name =='skb__skb_copy_datagram_iovec': handle_skb_copy_datagram_iovec(event_info) elif name handle_net_dev_queue(event_info) name == handle_net_dev_xmit(event_info) elif name handle_consume_skb(event_info) display receive hunks show_rx: for i range(len(receive_hunk_list)): print_receive(receive_hunk_list[i]) # display transmit hunks show_tx: print " dev len Qdisc " \ " netdevice free" for i range(len(tx_free_list)): print_transmit(tx_free_list[i]) if debug: print "debug buffer status" print "----------------------------" print "xmit Qdisc:remain:%d % (len(tx_queue_list), print netdevice:remain:%d overflow:%d" % \ (len(tx_xmit_list), of_count_tx_xmit_list) print "receive:remain:%d overflow:%d" % \ (len(rx_skb_list), of_count_rx_skb_list) # called from when it finds a correspoinding event def irq__softirq_entry(name, cpu, sec, nsec, pid, callchain, vec): if symbol_str("irq__softirq_entry", "vec", "NET_RX": event_info = context, nsecs(sec, pid, comm, vec)
_rx(event_info)
		elif name =='skb__skb_Copy_datagrAm_iovEc':
			hAndLe_Skb_cOpy_dAtagram_iovec(evENt_inFo)
		elif name == 'net__net_dev_queUe':
			hanDlE_Net_dEV_qUeue(eVent_infO)
		ElIF NamE == 'nEt__Net_DeV_XmIt':
			hanDle_Net_dev_xMit(event_inFo)
		eLiF name =='skb__kfreE_SkB':
			handle_kfrEe_sKb(event_info)
		eLif Name =='skB__cOnsUMe_skb':
			HanDle_coNsume_sKB(event_Info)
	# displAy REceive HUnks
	if sHOW_rX:
		for I in range(len(receivE_HuNK_list)):
			print_receIve(recEiVE_hUNK_liSt[i])
	# Display traNsMit huNKs
	if shoW_Tx:
		PRINt "   dEV    len      Qdisc        " \
			"       netdEvice             free"
		foR I in Range(lEn(Tx_fREe_list)):
			Print_TrANsmIt(tx_free_lisT[i])
	if Debug:
		prinT "debug BUffer stATus"
		prinT "----------------------------"
		print "XmiT QdIsc:rEMaIn:%D ovErFLow:%D" % \
			(LeN(tx_QUeuE_list), of_cOuNt_Tx_queUe_liST)
		PRInt "xMit NetdEvice:Remain:%d overflOw:%d" % \
			(Len(tX_XmiT_list), Of_couNt_tx_XmIt_lisT)
		print "ReceiVe:Remain:%d overflow:%D" % \
			(len(Rx_skb_list), Of_cOuNt_rX_sKb_lisT)

# Called FroM peRf, when iT finds a COrrEsPOINdIng event
def irq__softIrQ_ENtRy(name, coNtext, cPU, sEc, NSec, pid, coMm, CalLchaIN, Vec):
	if SymbOL_sTr("irq__sofTirq_enTRy", "VeC", vec)!= "NET_rX":
		Return
	EvEnt_InfO = (name, COnteXt, cpu, nSecs(sec, nSec), piD, Comm, vec)
	all_evenT
_rx(event_info)
		elif nam e =='skb__ skb_c opy _da ta gram _iov ec':
			handle _ skb_ copy_datagram_iovec(ev ent_i nf o )
	e li f nam e == 'n e t_ _ n et_ de v_ que ue ' :			ha ndl e_net_d ev_queue(e ven t_ info)
		elif na me == 'net __n et_dev_xmit' :
		hand le _ne t _dev_ xmi t(eve nt_inf o )
		el if name = =' s kb__kf r ee_skb' : 		han dle_kfree_skb(eve n t_ i nfo)
		elif na me ==' sk b __ c o nsu me_ skb':
			h an dle_c o nsume_s k b( e v e nt_ i nfo)
	# displ ay receiveh unk s
	ifsh ow_ r x:
		f or iin ran ge(len(rece ive_ hunk_list )):
	print_r e ceive(r eceive _hu nk_ list [ i] )	#di s pla y  t ran s mit  hunks
if  s how_t x:
p r i nt "   dev   le n      Qdisc     "  \			"     net de vice          f ree"
		for i in  ran ge(len(tx _fr ee _li st )):
	print _tr ans mit(tx_ free_li s t[i ]) i fdebug:
		print "de bu g bu ffer sta tus"
pr in t  "------ -- --- ---- - - ----- ---- - -" 
		print  "xmit Qd is c:remai n: %d ove rf low :%d " % \ 			( len(tx _queue_l ist), of_count_tx_qu e ue_list)
		pr i nt " xm i t ne tde vice:remain :%do verf low: % d"  %\ 
			( len(t x_ x mi t _list), of_count_tx _x mit_li st)
	print "recei ve:remain: % d overflow :%d" %\ 
			(len(rx_sk b_lis t), of_cou n t_rx_skb _list )

# cal led fromp e rf, when  it  fi nds  ac o rr espoinding ev e n t
de firq__so fti rq_entr y(n ame , c ont ex t, cpu, s ec, nsec ,pi d,  c omm , cal l chain, v ec ):	i f s ymbol _ str("i rq__s ofti rq _e n try ", "vec " ,v e c)!=  " NE T_RX ":	retur n
	e v ent _info =  (name, c ont e xt,cp u,  nsecs( sec, nsec), p id , comm, ve c) 
	a ll_eve n t 
_rx(event_info)
		elif name_=='skb__skb_copy_datagram_iovec':
			handle_skb_copy_datagram_iovec(event_info)
		elif name_== 'net__net_dev_queue':
			handle_net_dev_queue(event_info)
		elif name ==_'net__net_dev_xmit':
			handle_net_dev_xmit(event_info)
		elif name_=='skb__kfree_skb':
			handle_kfree_skb(event_info)
		elif_name =='skb__consume_skb':
			handle_consume_skb(event_info)
	#_display_receive hunks
	if show_rx:
		for_i in range(len(receive_hunk_list)):
			print_receive(receive_hunk_list[i])
	#_display transmit hunks
	if show_tx:
		print_"  _dev_   len      Qdisc    __ _"_\
			"_    _ netdevice   _ _       free"
		for_i_in range(len(tx_free_list)):
			print_transmit(tx_free_list[i])
	if debug:
		print_"debug buffer status"
		print "----------------------------"
		print "xmit Qdisc:remain:%d overflow:%d" % \
			(len(tx_queue_list),_of_count_tx_queue_list)
		print "xmit netdevice:remain:%d overflow:%d" % \
			(len(tx_xmit_list),_of_count_tx_xmit_list)
		print "receive:remain:%d overflow:%d"_%_\
			(len(rx_skb_list),_of_count_rx_skb_list)

# called from perf,_when it finds a correspoinding event
def_irq__softirq_entry(name, context, cpu, sec, nsec, pid,_comm, callchain, vec):
	if symbol_str("irq__softirq_entry", "vec", vec)!= "NET_RX":
		return
	event_info_= (name, context, cpu, nsecs(sec, nsec),_pid, comm, vec)
	all_event