Question

I'm running systemtap 2.2.1 on ubuntu 13.10 with kernel 3.11.0-generic.

The following script

probe begin {
  printf("Started...\n")
}

probe kernel.function("netif_receive_skb") {
  printf("%s\n",$skb$$);
  exit();
}

prints the following result

root@u1310:~# stap net.stp

Started...

{.next=0x0, .prev=0x0, .tstamp={.tv64=0}, .sk=0x0, .dev=0xffff880134c94000, .cb="", ._skb_refdst=0, .sp=0x0, .len=46, .data_len=0, .mac_len=14, .hdr_len=0, ={.csum=0, ={.csum_start=0, .csum_offset=0}}, .priority=0, .local_df=0, .cloned=0, .ip_summed=1, .nohdr=0, .nfctinfo=0, .pkt_type=0, .fclone=0, .ipvs_property=0, .peeked=0, .nf_trace=0, .protocol=8, .destructor=0x0, .nfct=0x0, .nfct_reasm=0x0, .nf_bridge=0x0, .skb_iif=0, ...} <-- How to print all the fields and not just the ellipsis?

root@u1310:~#

How can you print all the fields from the structure instead of the "ellipsis"...

Any help, pointers and/or references will be greatly appreciated, my google-fu only takes me so far...

Was it helpful?

Solution

From systemtap's tapsets.cxx:

2909 void
2910 dwarf_pretty_print::recurse_struct_members (Dwarf_Die* type, target_symbol* e,
2911                                             print_format* pf, int& count)

2965             // NB: limit to 32 args; see PR10750 and c_unparser::visit_print_format.
2966             if (pf->args.size() >= 32)
2967               {
2968                 pf->raw_components.append("...");
2969                 break;
2970               }

It's an implementation limitation related to a safety constraint (not wanting to risk blowing out the kernel stack by too many varargs). It should be possible to fix in the future.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top