From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116685 invoked by alias); 10 Jan 2017 02:36:19 -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 116502 invoked by uid 48); 10 Jan 2017 02:36:05 -0000 From: "penguin-kernel@i-love.sakura.ne.jp" To: systemtap@sourceware.org Subject: [Bug runtime/21020] reorganize argument passing from java probes Date: Tue, 10 Jan 2017 02:36:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: penguin-kernel@i-love.sakura.ne.jp X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 2017-q1/txt/msg00004.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D21020 --- Comment #2 from Tetsuo Handa --- Thank you for the patch. Let me confirm again. As of systemtap-3.0-7.el7 , it is possible to access java.lang.String argum= ent because $arg1 in method2 points to a valid address. ---------------------------------------------------------------------------= ----- # stap --compatible=3D3.0 -e 'probe java("Test1").class("Test1").method("method1(int)") { printf("Hooked method= 1() with arg =3D %d\n", $arg1); } probe java("Test1").class("Test1").method("method2(String)") { printf("Hook= ed method2() with arg =3D %s\n", user_string($arg1)); } probe java("Test1").class("Test1").method("method3") { printf("Hooked method3()\n"); }' -c 'java Test1' 100 Hello Test1@73549af8 Setting org.jboss.byteman.transform.all=3Dtrue 100 Hello Test1@73549af8 Hooked method1() with arg =3D 100 Hooked method2() with arg =3D Hello Hooked method3() ---------------------------------------------------------------------------= ----- If I built correctly from git source, as of commit f8bc2a5eb3e91ce7 "PR21020: reorganize data passing abi for java method parameters", it is no longer possible to access java.lang.String argument using --compatible=3D3.0 option because $arg1 in method2 points to NULL. Is this what you meant? ---------------------------------------------------------------------------= ----- # stap --compatible=3D3.1 -e 'probe java("Test1").class("Test1").method("method1(int)") { printf("Hooked method= 1() with arg =3D %s\n", arg1); } probe java("Test1").class("Test1").method("method2(String)") { printf("Hook= ed method2() with arg =3D %s\n", arg1); } probe java("Test1").class("Test1").method("method3(Test1)") { printf("Hooked method3() with arg =3D %s\n", arg1); }' -c 'java Test1' 100 Hello Test1@73549af8 Setting org.jboss.byteman.transform.all=3Dtrue 100 Hello Test1@73549af8 Hooked method1() with arg =3D 100 Hooked method2() with arg =3D Hello Hooked method3() with arg =3D Test1@73549af8 ---------------------------------------------------------------------------= ----- # stap --compatible=3D3.0 -e 'probe java("Test1").class("Test1").method("method1(int)") { printf("Hooked method= 1() with arg =3D %d\n", $arg1); } probe java("Test1").class("Test1").method("method2(String)") { printf("Hook= ed method2() with arg =3D %d\n", $arg1); } probe java("Test1").class("Test1").method("method3(Test1)") { printf("Hooked method3() with arg =3D %d\n", $arg1); }' -c 'java Test1' 100 Hello Test1@73549af8 Setting org.jboss.byteman.transform.all=3Dtrue 100 Hello Test1@73549af8 Hooked method1() with arg =3D 100 Hooked method2() with arg =3D 0 Hooked method3() with arg =3D 0 ---------------------------------------------------------------------------= ----- --=20 You are receiving this mail because: You are the assignee for the bug.