From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F6113857C4E; Tue, 20 Jul 2021 05:15:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F6113857C4E From: "cxxtao at gmail dot com" To: systemtap@sourceware.org Subject: =?UTF-8?B?W0J1ZyBydW50aW1lLzI4MTA3XSBOZXc6IGVycm9yOiDigJhzdHJ1?= =?UTF-8?B?Y3QgdGFza19zdHJ1Y3TigJkgaGFzIG5vIG1lbWJlciBuYW1lZCDigJhzdGF0?= =?UTF-8?B?ZeKAmQ==?= Date: Tue, 20 Jul 2021 05:15:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cxxtao at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2021 05:15:36 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28107 Bug ID: 28107 Summary: error: =E2=80=98struct task_struct=E2=80=99 has no memb= er named =E2=80=98state=E2=80=99 Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: runtime Assignee: systemtap at sourceware dot org Reporter: cxxtao at gmail dot com Target Milestone: --- My simple stp script: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #!/usr/bin/stap -v probe begin { printf("start watching, press Ctrl+C to get the result...\n"); } global hit_cnt global cwnd_stat function watch(sock:long, sockb:long, tport:long) { tcphdr =3D __get_skb_tcphdr(sockb); if (__tcp_skb_sport(tcphdr) =3D=3D tport || __tcp_skb_dport(tcphdr) =3D=3D tport) { hit_cnt +=3D 1; cwnd_stat <<< tcp_get_info_snd_cwnd(sock); } } probe kernel.function("tcp_ack").return { watch(@entry($sk), @entry($skb), $1); } probe end { printf("\nhandled %d ack in total\n", hit_cnt); if (@count(cwnd_stat) > 0) #print(@hist_log(cwnd_stat)) print(@hist_linear(cwnd_stat, 0, 5000, 200)); } The error reported: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Pass 1: parsed user script and 489 library scripts using 214732virt/84812res/5812shr/79192data kb, in 500usr/30sys/526real ms. Pass 2: analyzed script: 7 probes, 12 functions, 3 embeds, 9 globals using 282900virt/153836res/6956shr/147360data kb, in 3060usr/1810sys/8929real ms. Pass 3: translated to C into "/tmp/stapQ7coV3/stap_e0bd1702d3065442071dbf4e6a9c2b95_21745_src.c" using 282900virt/154028res/7148shr/147360data kb, in 10usr/10sys/19real ms. In file included from /usr/share/systemtap/runtime/linux/task_finder2.c:4, from /usr/share/systemtap/runtime/linux/task_finder.c:17, from /usr/share/systemtap/runtime/linux/runtime.h:256, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapQ7coV3/stap_e0bd1702d3065442071dbf4e6a9c2b95_21745_src.c:21: /usr/share/systemtap/runtime/stp_utrace.c: In function =E2=80=98utrace_do_s= top=E2=80=99: /usr/share/systemtap/runtime/stp_utrace.c:38:14: error: =E2=80=98struct tas= k_struct=E2=80=99 has no member named =E2=80=98state=E2=80=99; did you mean =E2=80=98__state= =E2=80=99? 38 | do { (tsk)->state =3D (state_value); } while (0) | ^~~~~ /usr/share/systemtap/runtime/stp_utrace.c:1246:4: note: in expansion of mac= ro =E2=80=98__stp_set_task_state=E2=80=99 1246 | __stp_set_task_state(target, TASK_TRACED); | ^~~~~~~~~~~~~~~~~~~~ /usr/share/systemtap/runtime/stp_utrace.c: In function =E2=80=98utrace_wake= up=E2=80=99: /usr/share/systemtap/runtime/stp_utrace.c:1266:11: error: =E2=80=98struct t= ask_struct=E2=80=99 has no member named =E2=80=98state=E2=80=99; did you mean =E2=80=98__state= =E2=80=99? 1266 | target->state =3D TASK_STOPPED; | ^~~~~ | __state make[2]: *** [/tmp/stapQ7coV3/stap_e0bd1702d3065442071dbf4e6a9c2b95_21745_src.o] Error 1 make[1]: *** [/tmp/stapQ7coV3] Error 2 make: *** [__sub-make] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compiled C into "stap_e0bd1702d3065442071dbf4e6a9c2b95_21745.ko" in 26850usr/3470sys/6437real ms. Pass 4: compilation failed. [man error::pass4] My fixs: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D According to the error message, I renamed the member to '__state' in stp_utrace.c, then the script runs fine. Version Info: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D systemtap git commitid: a29f65d @ git://sourceware.org/git/systemtap.git the kernel git commitid: 9615fe3 @ git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git --=20 You are receiving this mail because: You are the assignee for the bug.=