This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Adding a some new probes to the networking.stp tapset


David, 

Thanks for the review. 

David Smith wrote:
> So, I think it would be better to trade off the six assignments and the
> call to the _dwarf_tvar_get_dev_* and make separate sets of temporary
> variables.  You'll end up increasing the number of temporaries that way,
> but it should execute faster if only one of the mac addresses is used.

Do you mean something like: 

+	old_zero = $dev->dev_addr[0]
+	old_one =  $dev->dev_addr[1]
+	old_two =  $dev->dev_addr[2]
+	old_three =$dev->dev_addr[3] 
+	old_four = $dev->dev_addr[4]
+	old_five = $dev->dev_addr[5]
+	old_mac = sprintf("%02x:%02x:%02x:%02x:%02x:%02x",
+			 old_zero, old_one, old_two, old_three, old_four, old_five)
+
+	// New MAC Address
+	new_zero = $sa->sa_data[0]
+	new_one  = $sa->sa_data[1]
+	new_two  = $sa->sa_data[2]
+	new_three =$sa->sa_data[3] 
+	new_four  =$sa->sa_data[4] 
+	new_five = $sa->sa_data[5]
+	new_mac = sprintf("%02x:%02x:%02x:%02x:%02x:%02x",
+			 new_zero, new_one, new_two, new_three, new_four, new_five)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]