From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id D9A12385800F for ; Sun, 7 Aug 2022 16:09:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9A12385800F Received: by mail-pg1-x534.google.com with SMTP id 12so6625244pga.1 for ; Sun, 07 Aug 2022 09:09:35 -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:from:date:message-id:subject:to; bh=GHC2gXk5y478HW2Rwpwck2Gg/eF7t28qIoZhZ+Nlj+g=; b=eJxrwxhFHTDU4FPUgMuIAqaFhPQ54aqXo99NQ9l8Xemnfm82+qq4KYBziwnKQCt6Hg O3KRtDv5C+E9yyBw5yLh6Hru+syWLf3kU478xYDHfgUInPFIKJbZ0oceZ7EPBOjK9WrR FEBdR+1Pqnr8FBX5RS0lBtVSlaAARo+tSdDf0Vz29U8OHf+P1RSXjEQlfj00Hl1uCVVq +zCFXi7hZ55EXR5Ky2IUZ7J7r9BgoCitH9zOFLGl9g+owBChhQ4N5sb/jFdnHcHGwyzI C8A0BqDsrEwUknNAc1sfGkf4cst6QpMQcc6aw40IZw/3Eam0PYY+aiJ/prSA35z5Szx9 UwVQ== X-Gm-Message-State: ACgBeo017NzOCJMBl0ztL+ajRS83wuJ1yBIt2Z1MjQb0XXUrkwGBXvcl BWGyLEOnRrx05auqL3vQac+nCco/x9FL54odwySFKyKdkx5sWg== X-Google-Smtp-Source: AA6agR7U+KoxvkHhPnOJ5XFz/qDcIroqJqrMOSkZ/SM4L1KAQm3aAk7+zT9mrSS/jDenqeW4ExLpDCbsnyEW1XaBk64= X-Received: by 2002:a63:1058:0:b0:41c:26f4:92f9 with SMTP id 24-20020a631058000000b0041c26f492f9mr12143162pgq.25.1659888574558; Sun, 07 Aug 2022 09:09:34 -0700 (PDT) MIME-Version: 1.0 From: Yeshpal Jain Date: Sun, 7 Aug 2022 21:39:23 +0530 Message-ID: Subject: Run system tap with a user defined function To: systemtap@sourceware.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sun, 07 Aug 2022 16:09:37 -0000 I want to run a user defined function inside one of the function probes. for ex : #! /usr/bin/env stap function __read_phase:long(phase:long) %{ /* pure */ struct phase *phase_s =3D (struct phase *)((long)STAP_ARG_phase); int phase_st =3D phase->p_state; STAP_RETURN(phase_st); %} /* <-- function body */ function trace_phase(entry_p, extra) { %( $# > 1 %? if (tid() in trace) %) printf("%s%s%s %s phase =3D %d\n", thread_indent (entry_p), (entry_p>0?"->":"<-"), ppfunc (), extra, __read_phase($fom)) } probe process("/root/test/.libs/mylib.so").function("*_test_func").call { trace_phase(1, $$parms) } i am running stap with -g option, when i compile i am getting error, error: dereferencing pointer to incomplete type =E2=80=98struct phase=E2=80= =99 struct phase is a structure defined in mylibrary, Is there a way to include custom directory/headers while generating system tap. --=20 Thanks and Regards, Yeshpal Jain.