Android的NDK CPU负载 [英] Android NDK Load CPU

查看:193
本文介绍了Android的NDK CPU负载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写使用Android NDK的程序。该方案采用了一些库。这一切是非常重的CPU 90%。我怎样才能找出其中大部分负载的图书馆的CPU?是有这种特殊的技术或工具?

Write a program using the Android NDK. The program uses a few libraries. All this is very heavy CPU to 90%. How can I find out which of the libraries of most loads the CPU? is there for this special techniques or tools?

编辑:
这就是我的了:

That's what I got:



[user@localhost HelloNDK]$ ./remotegdb.sh
Package name is org.divenvrsk.android.hellondk
Found running pid: 7726
Device CPU ABIs: armeabi-v7a armeabi
Using app_out directory: /home/user/Dropbox/HelloNDK/obj/local/armeabi-v7a
68 KB/s (5680 bytes in 0.080s)
Pulled /home/user/Dropbox/HelloNDK/obj/local/armeabi-v7a/app_process from device/emulator.
2206 KB/s (278276 bytes in 0.123s)
Pulled /home/user/Dropbox/HelloNDK/obj/local/armeabi-v7a/libc.so from device/emulator.
Running gdbserver :5039 --attach 7726
su: not found
/home/user/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
/home/user/Dropbox/HelloNDK/libs/armeabi-v7a/gdb.setup
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-elf-linux".
Warning: /home/user/Dropbox/HelloNDK/jni/sox/flac/src/share/include: No such file or directory.
Warning: /home/user/Dropbox/HelloNDK/jni/sox/flac/src/metaflac/include: No such file or directory.
Warning: /home/user/Dropbox/HelloNDK/jni/sox/src/../libpng-1.5.2/include: No such file or directory.
Warning: /home/user/Dropbox/HelloNDK/jni/sox/work/../libpng-1.5.2/include: No such file or directory.
/home/user/Dropbox/HelloNDK/obj/local/armeabi-v7a/gdb.setup:3: Error in sourced command file:
Remote communication error: Connection reset by peer.
(gdb) 

下一步做什么,以确定加载某些库?

What to do next in order to determine the load certain libraries?

推荐答案

NDK-GDB和的的Andr​​oid NDK廓会帮助你获得的个人资料信息。

ndk-gdb and android-ndk-profiler would help you to get profile information.

这篇关于Android的NDK CPU负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆