80 n2762-2 a-trepn_plugin_eclipse_ug

Click here to load reader

Post on 19-May-2015

125 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

  • 1. Qualcomm is a trademark of QUALCOMM Incorporated, registered in the United States and other countries. All QUALCOMM Incorporated trademarks are used with permission. Other product and brand names may be trademarks or registered trademarks of their respective owners. This technical data may be subject to U.S. and international export, re-export, or transfer (export) laws. Diversion contrary to U.S. and international law is strictly prohibited. 2013 Qualcomm Technologies, Inc. All rights reserved. Trepn Plug-in for Eclipse User Guide 80-N2762-2 A September 23, 2013 Submit technical questions at: https://developer.qualcomm.com/forums/qdevnet-forums/trepn-plug-eclipse

2. 80-N2762-2 A 2 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION Contents 1 Introduction...................................................................................................... 4 1.1 Trepn Plug-in ............................................................................................................4 1.2 Conventions ..................................................................................................................4 1.3 Updates to this version..................................................................................................4 1.4 References.....................................................................................................................5 1.5 Technical assistance......................................................................................................5 2 Installing the Trepn Plug-in ............................................................................ 6 2.1 Requirements ................................................................................................................6 2.2 Installation steps ...........................................................................................................6 3 Using the Trepn Plug-in ................................................................................ 10 3.1 Trepn Control pane .....................................................................................................10 3.2 Starting and stopping a profile....................................................................................11 3.3 Manipulating and viewing chart information..............................................................13 3.4 Creating custom charts................................................................................................15 3.5 Collecting debug output with Trepn LogCat ..............................................................15 3.6 Updating the Trepn Plug-in ........................................................................................16 3.7 Uninstalling the Trepn Plug-in....................................................................................16 3. 80-N2762-2 A 3 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION Revision history Revision Date Description A Sep 2013 Initial release 4. 80-N2762-2 A 4 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 1 Introduction1 1.1 Trepn Plug-in2 The Trepn Plug-in for Eclipse is a plug-in running on a Mac/PC computer in the Eclipse3 environment that allows developers to gain insight into how running their app affects power4 consumption. The Trepn Plug-in is designed for developers to analyze power consumption and5 optimize the power efficiency of their apps.6 The Trepn Plug-in works in conjuction with the Trepn Profiler, an Android app that is installed7 on your connected device when you run the Trepn Plug-in. See [Q1] for details on using the8 Trepn Profiler.9 For more information and to ask technical questions about the Trepn Plug-in and the10 Trepn Profiler app, see the forum at https://developer.qualcomm.com/forums/qdevnet-11 forums/trepn-plug-eclipse.12 1.2 Conventions13 Function declarations, function names, type declarations, and code samples appear in a different14 font, e.g., #include.15 Button and key names appear in bold font, e.g., click Save or press Enter.16 1.3 Updates to this version17 This is the initial beta release of the Trepn Plug-in.18 5. Introduction 80-N2762-2 A 5 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 1.4 References1 Reference documents are listed in Table 1-1. Reference documents that are no longer applicable2 are deleted from this table; therefore, reference numbers may not be sequential.3 Table 1-1 Reference documents and standards4 Ref. Document Qualcomm Technologies Q1 Trepn Profiler Starter Edition User Guide 80-N2762-1 Resources R1 Android SDK for Android Developers http://developer.android.com/sdk/index.html R2 Installing the Eclipse Plug-in http://developer.android.com/sdk/installing/ installing-adt.html R3 Using Hardware Devices http://developer.android.com/tools/device.html R4 Trepn Plug-in for Eclipse FAQ https://developer.qualcomm.com/mobile- development/performance-tools/trepn-plugin- eclipse/faq R5 LogCat for Android Developers http://developer.android.com/tools/help/ logcat.html R6 Trepn Plug-in for Eclipse Forum https://developer.qualcomm.com/forums/ qdevnet-forums/trepn-plug-eclipse 5 1.5 Technical assistance6 For assistance or clarification on information in this document, visit the Trepn Plug-in for Eclipse7 Forum at https://developer.qualcomm.com/forums/qdevnet-forums/trepn-plug-eclipse.8 9 6. 80-N2762-2 A 6 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 2 Installing the Trepn Plug-in1 2.1 Requirements2 n Mac or PC with:3 Eclipse with ADT Plug-in Install either the ADT Bundle [R1] or ADT Plug-in [R2]4 ADB ver 1.0.31 or higher Ensure ADB is in your system variables path and working;5 see [R3] or Internet forums6 n Android device See [R4] for a list of supported devices7 2.2 Installation steps8 1. Launch Eclipse.9 2. Select Help Install New Software.10 3. Click Add.11 4. Enter the following then click OK:12 Name You may use any name, e.g., Trepn Plug-in13 Location https://developer.qualcomm.com/docs/trepn/eclipse/14 7. Installing the Trepn Plug-in 80-N2762-2 A 7 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 1 2 5. Select the Trepn Plug-in checkbox and click Next.3 6. In Install Details, click Next.4 8. Installing the Trepn Plug-in 80-N2762-2 A 8 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 7. Review and accept the license agreement and click Finish:1 2 3 8. If you see a security warning regarding unsigned content, click OK.4 5 6 Installing dependencies may take a few minutes.7 9. After installation completes, restart Eclipse.8 10. Select Window Open Perspective Other.9 9. Installing the Trepn Plug-in 80-N2762-2 A 9 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 11. Select Trepn and click OK. Downloading additional files may take a few minutes.1 2 3 10. 80-N2762-2 A 10 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 3 Using the Trepn Plug-in1 3.1 Trepn Control pane2 Figure 3-1 shows the Trepn controls.3 } Starts profiling with Wakelocks Starts profiling without Wakelocks Retrieves most recent data file from device Exports datafiles as .trepn file Stops profiling Opens Trepn data file Eclipse toolbar has no effect on Trepn 4 Figure 3-1 Trepn controls5 Exporting a .trepn file is the equivalent of creating a zip file containing the .db database file and6 the LogCat file, saved locally in the current workspace _trepn/logs/ folder.7 11. Using the Trepn Plug-in 80-N2762-2 A 11 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 3.2 Starting and stopping a profile1 To profile:2 1. Launch Eclipse.3 2. Connect your device to the computer via USB. Confirm that your device is listed.4 Device enumerates but should not be listed as Offline5 6 3. In the Trepn Control pane, click the green play icon to start profiling.7 Play icon starts profile 8 9 12. Using the Trepn Plug-in 80-N2762-2 A 12 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION If not already installed, the Trepn Profiler Android app will be installed on your device and1 will begin profiling.2 Status changes to indicate Trepn Profiler is running 3 4 NOTE: On commercial devices Battery Power measurements, Wakelocks, and WifiLocks will not be5 accurate if the device is connected via USB. On Snapdragon Mobile Development Platform6 (MDP) devices, this is not an issue.7 4. If Battery Power measurements, Wakelocks, and WifiLocks are being profiled, disconnect8 the USB cable from your device.9 5. When done with the test run, reconnect your device via USB (if needed).10 6. In the Trepn Control pane, click the red stop icon to stop profiling, save, and display the data.11 Stop icon (stops Trepn Profiler and retrieves the session data from device) 12 13 13. Using the Trepn Plug-in 80-N2762-2 A 13 MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 3.3 Manipulating and viewing chart information1 When you do not have a profile session loaded, the checkboxes under Charts, which control2 showing and hiding the graph, are not clickable; i.e., without a profile session loaded, there is3 nothing to show or hide. You can load a log file in one of the following ways:4 n With your device connected, start and stop a profile as indicated above to create and load a5 new file (.db).6 n In the Trepn Control pane, click the Open icon and select a .db or .trepn file to open.7 In the Trepn Control pane, check the Charts that you wish to display. Grayed out checkboxes8 indicate data is not available, e.g., if you are not connected via Wi-Fi, these checkboxes are9 grayed out.10 Tips11 n Hover over the graph to display a tooltip with more details.12 n Zoom in by clicking and dragging a box around the desired portion of the graph from upper13 left to lower right.14 n Zoom out by clicking and dragging from the lower right to upper left.15 n Click on a point in the graph to move the LogCat