From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68355 invoked by alias); 31 Mar 2017 04:08:17 -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 68308 invoked by uid 89); 31 Mar 2017 04:08:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:U*dsmith X-HELO: mail-wr0-f182.google.com Received: from mail-wr0-f182.google.com (HELO mail-wr0-f182.google.com) (209.85.128.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Mar 2017 04:08:15 +0000 Received: by mail-wr0-f182.google.com with SMTP id w11so86304458wrc.3 for ; Thu, 30 Mar 2017 21:08:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SJmD7dfRpib2qJsIIAVyXkcAeft/3sueZ+FfI4fYYIU=; b=CEAc8OyspLYv39mDralU2mX/BlsfYbCzLG8aLUhyu92FVMVndSGhTizj1Yt71gOaTh ZG9n440K5VvmjULoMiCC+CeZw0pkajMA8AToeWni0iiCKgmnNfucKQvwNZ0UTYmY0UCr l+wKykGM1DUnU/0zjMCLGH55yp35/uyjdBSwP9wzfY3jhgPTTolHwDmnWRWw/vAvTJOT iJKEk4GUUaCbHVSJjqeHDTDnYhX3Mf5dNR+V84fhDIiRSmXPv6s+cEbS6K1Xht4rHuUU CqxUzN8gRemqarKdP6ECWQpMM0RyuN1jW/RIuAJClY7hxgvyHWjyTSt/tLfiZqHMVonr j/3g== X-Gm-Message-State: AFeK/H0Ye1kDt/bW+JRCdhHJnzHrdJRmMZoLMa3bhCTTGYIzDR2ro5cgSP18ut10ioo8sgfDeXCtCOccdraBGg== X-Received: by 10.28.32.70 with SMTP id g67mr709736wmg.61.1490933294738; Thu, 30 Mar 2017 21:08:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.184.29 with HTTP; Thu, 30 Mar 2017 21:07:54 -0700 (PDT) In-Reply-To: References: From: Arkady Date: Fri, 31 Mar 2017 04:08:00 -0000 Message-ID: Subject: Re: Is it ok to insert a module multiple times with staprun? To: Shiyao Ma Cc: David Smith , systemtap@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00184.txt.bz2 The easiest is to have a global variable and check it in all probes. You can set the flag from proc.read On Fri, Mar 31, 2017 at 6:51 AM, Shiyao Ma wrote: > Hi, > >> Really to help you further you are going to have to describe what you >> are trying to do a bit further. > > > My aim is to pass in some information (arguments) to the module at run > time (so in pass-5 time, not pass-[1-4]). > That rules out the first option. stap -e "foobar". > > Also, using the command line of staprun does not work here, due to the > length limitation on shell command line. > > The second procfs option, on the other hand, sounds feasible. > However, I have a minor concern here. I'd like the info passed to the > module (via procfs) be read at the very beginning, *before any > kernel.function" probe has been registered to the system. > In other words, any kernel.function probe should only be activated > after the procfs.read is done. > > The closest thing I can come up in my mind is to do something like: > probe begin { > read_the_procfs_file_and_wait() > } > > That is, put the reading file stuff into the begin probe. > > Possible to achieve that? > > > Regards.