|
From: Marc S. <mar...@gm...> - 2013-11-21 16:51:38
|
Hi! I'm trying to use callgrind with an APK in the emulator with API15 and valgrind 3.9 without any success. Can valgrind instrument APKs or not? -- Marc |
|
From: John R. <jr...@Bi...> - 2013-11-21 19:42:54
|
> I'm trying to use callgrind with an APK in the emulator with API15 and valgrind 3.9 without any success. > > Can valgrind instrument APKs or not? No. An .apk is a file which is a container for many kinds of information. Valgrind tools instrument the instantiation of a process, and not a container. The "hook" for valgrind, the place where valgrind intercepts control and begins co-execution of the valgrind tool with the target program, is execve(). execve() is an very clean interface. The operating system discards entirely the old memory image, and instantiates a new memory image "from scratch." This cleanliness is essential for the valgrind tool to identify and understand easily the initial state of what is being instrumented. -- |
|
From: Marc S. <mar...@gm...> - 2013-11-21 20:06:36
|
In Android most of people uses APK as aplication not as file. But I didn't understand if it works or not with an application (apk) running inside the DVM. 2013/11/21 John Reiser <jr...@bi...> > > I'm trying to use callgrind with an APK in the emulator with API15 and > valgrind 3.9 without any success. > > > > Can valgrind instrument APKs or not? > > No. An .apk is a file which is a container for many kinds of information. > Valgrind tools instrument the instantiation of a process, and not a > container. > > The "hook" for valgrind, the place where valgrind intercepts control > and begins co-execution of the valgrind tool with the target program, is > execve(). > execve() is an very clean interface. The operating system discards > entirely > the old memory image, and instantiates a new memory image "from scratch." > This cleanliness is essential for the valgrind tool to identify and > understand easily the initial state of what is being instrumented. > > -- > > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- Marc |
|
From: Josef W. <Jos...@gm...> - 2013-11-22 00:18:23
|
Am 21.11.2013 21:06, schrieb Marc Sampé: > In Android most of people uses APK as aplication not as file. But I > didn't understand if it works or not with an application (apk) running > inside the DVM. It may work, but you get the call-graph of how Dalvik is executing your application (ie. the internal functions executed in Dalvik for translating, or for GC, and so on). Most probably, this is not what you want. Unless you want to profile own native code behind JNI. Any good high-level-language VM should have a profiler built in. Not sure about Dalvik. Josef > > > 2013/11/21 John Reiser <jr...@bi... <mailto:jr...@bi...>> > > > I'm trying to use callgrind with an APK in the emulator with API15 > and valgrind 3.9 without any success. > > > > Can valgrind instrument APKs or not? > > No. An .apk is a file which is a container for many kinds of > information. > Valgrind tools instrument the instantiation of a process, and not a > container. > > The "hook" for valgrind, the place where valgrind intercepts control > and begins co-execution of the valgrind tool with the target > program, is execve(). > execve() is an very clean interface. The operating system discards > entirely > the old memory image, and instantiates a new memory image "from > scratch." > This cleanliness is essential for the valgrind tool to identify and > understand easily the initial state of what is being instrumented. > > -- > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and > game-changing > conversations that shape the rapidly evolving mobile landscape. Sign > up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-users mailing list > Val...@li... > <mailto:Val...@li...> > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > > -- > Marc > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Marc S. <mar...@gm...> - 2013-11-22 00:45:54
|
All my tries using logwrapper always ends with a system death and the kernel reboot. And of course Dalvik has a built-in debugging systeam using JDWP and little extensions for DDMS. But this only works when the system is in debugging mode. And I need to break that restriction. Thats why Im trying to instrument DVM with Valgrind. 2013/11/22 Josef Weidendorfer <Jos...@gm...> > Am 21.11.2013 21:06, schrieb Marc Sampé: > > In Android most of people uses APK as aplication not as file. But I > > didn't understand if it works or not with an application (apk) running > > inside the DVM. > > It may work, but you get the call-graph of how Dalvik is executing > your application (ie. the internal functions executed in Dalvik for > translating, or for GC, and so on). > Most probably, this is not what you want. Unless you want to profile > own native code behind JNI. > > Any good high-level-language VM should have a profiler built in. > Not sure about Dalvik. > > Josef > > > > > > > 2013/11/21 John Reiser <jr...@bi... <mailto: > jr...@bi...>> > > > > > I'm trying to use callgrind with an APK in the emulator with API15 > > and valgrind 3.9 without any success. > > > > > > Can valgrind instrument APKs or not? > > > > No. An .apk is a file which is a container for many kinds of > > information. > > Valgrind tools instrument the instantiation of a process, and not a > > container. > > > > The "hook" for valgrind, the place where valgrind intercepts control > > and begins co-execution of the valgrind tool with the target > > program, is execve(). > > execve() is an very clean interface. The operating system discards > > entirely > > the old memory image, and instantiates a new memory image "from > > scratch." > > This cleanliness is essential for the valgrind tool to identify and > > understand easily the initial state of what is being instrumented. > > > > -- > > > > > > > ------------------------------------------------------------------------------ > > Shape the Mobile Experience: Free Subscription > > Software experts and developers: Be at the forefront of tech > innovation. > > Intel(R) Software Adrenaline delivers strategic insight and > > game-changing > > conversations that shape the rapidly evolving mobile landscape. Sign > > up now. > > > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > > _______________________________________________ > > Valgrind-users mailing list > > Val...@li... > > <mailto:Val...@li...> > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > > > > > > > -- > > Marc > > > > > > > ------------------------------------------------------------------------------ > > Shape the Mobile Experience: Free Subscription > > Software experts and developers: Be at the forefront of tech innovation. > > Intel(R) Software Adrenaline delivers strategic insight and game-changing > > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > > > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > Valgrind-users mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > -- Marc |