From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id B2DFF3858D35 for ; Wed, 29 Sep 2021 09:14:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2DFF3858D35 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-ueRmXskOPL2rmgwLtmD-FA-1; Wed, 29 Sep 2021 05:14:57 -0400 X-MC-Unique: ueRmXskOPL2rmgwLtmD-FA-1 Received: by mail-ot1-f72.google.com with SMTP id p26-20020a9d4e1a000000b0054d847be7aaso1597756otf.7 for ; Wed, 29 Sep 2021 02:14:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dZ+SRpeaUOlO9rBDdL3/OyASi1kZWqDDegcGtWfgQ8E=; b=Bu5Om90KeIUJ5ype+qVSM7laYW9soL/ubxTEIUPc3S2TNnCDXklcaRhwAMcD71WJR8 cSPSrcKfXJluvQQUPf+qtUpQ3rsDBJgkakJ7ZENx60ihJT7uNpJZ+2nsJdX9WukINTXG 8IIlY1UlEww4sfYdUB4JcywYeek07f/yMG/jolR4Y7ckuCRXjzlnmNCgp6aM8Mx7bLX4 j5og26IS1VrsOYWaz6I/YK58i6BH8pGpcr1iwgYfjjbmbktw06rrTBQviTIevmv8U+2y /1Oq/hfQxbaJkiLJ2TNbZ1SvxvhXRJkco/t0I674nnuMUWjCQlHtV8hIdJgFv1QT+8ko OewA== X-Gm-Message-State: AOAM5318J1eknrLDpnmQ3iCxgT8dm4F1nS7LqwQdjTtcMbOdwD6Uiyjn 7tL1OXV9A2zVWcVF7YE80BVPZrDxNrP72KMHr474+hF8za1r4cy96bdnClCi4gJKLwDkqMvM8i/ xRahOOwaUDTxp1Rl7J4L/NGPHkIdAYnzf1fk= X-Received: by 2002:a05:6830:24a8:: with SMTP id v8mr8880006ots.185.1632906896948; Wed, 29 Sep 2021 02:14:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRSH3BNGhyfau9Wm0Z4iSBu+YyV93JucLilnarZX989WnSpbLwi3AuUxrjONrXCBhIa2uyDCvs6L3mP/lzRiY= X-Received: by 2002:a05:6830:24a8:: with SMTP id v8mr8879999ots.185.1632906896731; Wed, 29 Sep 2021 02:14:56 -0700 (PDT) MIME-Version: 1.0 References: <20210923174903.605613-1-nsoffer@redhat.com> <20210923230011.GC15826@redhat.com> In-Reply-To: <20210923230011.GC15826@redhat.com> From: Nir Soffer Date: Wed, 29 Sep 2021 12:14:40 +0300 Message-ID: Subject: Re: [PATCH] Fix traceaio with IO_CMD_{PREAD,PWRITE} To: "Frank Ch. Eigler" Cc: systemtap@sourceware.org, David Teigland X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: Wed, 29 Sep 2021 09:15:01 -0000 On Fri, Sep 24, 2021 at 2:00 AM Frank Ch. Eigler wrote: > > Hi - > > > This works: > > > > global IO_CMD_PREADV = 7 > > global IO_CMD_PWRITEV = 8 > > > > Do we have a better way to handle this? > > Within a tapset snippet, code can use > @const("IO_CMD_PREADV") > referring to an identifier in embedded-C scope. This works, bug require -g in stap script. I don't think it makes sense to require Guru mode just to access an enum. It would be nice it this could work without -g, since accessing constants seems to be a safe operation. > If the IO_CMD_PREADV identifier were an enum value that shows up in > DWARF, then $IO_CMD_PREADV can resolve in recent versions of stap. I could not find the enum in debuginfo files or in stap -L output, but maybe I was not using the right tool for this. In a test program using libaio, I cannot find the enum values in the symbols so I guess this info is not available. > If none of the above, yeah, use the global gadget. I sent v2 using globals. Nir