From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94595 invoked by alias); 21 Jun 2016 18:41:41 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 94401 invoked by uid 48); 21 Jun 2016 18:41:29 -0000 From: "dsmith at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/12748] need syscall-number database in tapset Date: Tue, 21 Jun 2016 18:41:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dsmith at redhat dot com X-Bugzilla-Status: ASSIGNED 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: Message-ID: In-Reply-To: References: 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-SW-Source: 2016-q2/txt/msg00267.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D12748 --- Comment #7 from David Smith --- Comment on attachment 9345 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D9345 proposed patch Right now the script only handles x86_64, ppc64, and s390x. I'd like to see= it handle an arch that has only one ABI (like i686, arm, or aarch64). That will flush out some issues I'd bet. I'll bikeshed the following: =3D=3D=3D=3D function syscall_name(num) { %( CONFIG_COMPAT =3D=3D "y" %? if (@__compat_task) return __syscall_32_num2name[num] %) if (%{ BITS_PER_LONG %} =3D=3D 64) return __syscall_64_num2name[num] else return __syscall_32_num2name[num] } =3D=3D=3D=3D It would be a bit better as: =3D=3D=3D=3D function syscall_name(num) { %( CONFIG_COMPAT =3D=3D "y" %? if (@__compat_task) return __syscall_32_num2name[num] %) %( CONFIG_64BIT =3D=3D "y" %? return __syscall_64_num2name[num] %: return __syscall_32_num2name[num] %) } =3D=3D=3D=3D The new version converts that 64-bit runtime check to a compile-time check.= The same thing can be done to the syscall_num() function. How do you see syscall_map() being used? Is it just for use by the testsuit= e? --=20 You are receiving this mail because: You are the assignee for the bug.