GithubHelp home page GithubHelp logo

uber / nanoscope Goto Github PK

View Code? Open in Web Editor NEW
1.2K 37.0 68.0 7.14 MB

An extremely accurate Android method tracing tool.

License: Apache License 2.0

HTML 70.07% Kotlin 29.43% Shell 0.50%
android profiler performance tracing

nanoscope's Introduction

Nanoscope

An extremely accurate Android method tracing tool.

Overview

Nanoscope is a method tracing tool optimized for extreme accuracy. The tool's overhead has been measured at around ~20 nanoseconds per method (on a Nexus 6P). To achieve this performance, the interesting pieces of Nanoscope are implemented as a fork of AOSP. For this reason, you'll need to use the Nanoscope Emulator or a device running the Nanoscope OS in order to make use of this tool. The entrypoint for launching the Nanoscope emulator, provisioning a device with the custom OS, and starting/stopping tracing is the nanoscope command-line tool described below.

For more information on motivation and architecture, check out our blog post and the wiki.

Installation

Install the nanoscope command

$ brew tap uber/nanoscope
$ brew install nanoscope

Nanoscope Emulator / Devices

Nanoscope only works with the Nanoscope Emulator or with a device that's running the Nanoscope OS.

Launch Nanoscope Emulator

# Prerequisites
#   - $ANDROID_HOME environment variable is set
#   - macOS

$ nanoscope emulator

Flash ADB-connected phone with the Nanoscope OS

If you want to use Nanoscope with a real device, you can execute the following command to replace your stock Android OS with the Nanoscope OS.

IMPORTANT: This will only work with a Nexus 6P - do not attempt to flash any other device

IMPORTANT: This command installs a custom operating system onto the device. There is no way to undo this operation.

# Prerequisites
#   - Nexus 6p is the only supported device at this time
#   - OEM Unlocking is enabled (Settings -> Developer Options -> OEM unlocking)
#   - Device is connected via ADB

$ nanoscope flash

Usage

Start tracing on ADB-connected device

$ nanoscope start
Tracing... (Press ENTER to stop)

Startup tracing

$ nanoscope start --package=com.example.app
Tracing... (Press ENTER to stop)

It's necessary to specify the application package if you want to start tracing before running the app.

Extensions

In addition to method tracing, Nanoscope can generate additional information about executing application (e.g. CPU utilization for a given thread, number of page faults, object allocation information). You can enable this additional functionality by using --ext parameter with nanoscope start command. It is also necessary to change the kernel setting of Nexus 6P as follows:

$ adb shell "echo -1 >/proc/sys/kernel/perf_event_paranoid"

Please note that extended functionality DOES NOT work on emulators (and is therefore not included in our emulator release). Additional information about this Nanoscope extension can be found here.

Upgrade

Client

$ brew update && brew upgrade nanoscope

OS

$ brew update && brew upgrade nanoscope
$ nanoscope flash

License

Copyright (C) 2017 Uber Technologies

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

nanoscope's People

Contributors

attwellbrian avatar carlonzo avatar leland-takamine avatar ugonna avatar zacsweers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanoscope's Issues

Better initial loading state

We have a loading state while we parse the trace data. We should also add a better loading state while we load the trace data.

Nexus 6P with nanoscope's pre-built ROM cannot boot after reboot.

Android ROM (v0.2.3) boots normally directly after fastboot ROM flash. However, subsequent boot will get stuck on screen with white "Google" text with small lock icon on the bottom of the screen.
Is this a known problem with the newest release or do I have a special Nexus 6P?

Install failed.

➜ ~ brew install nanoscope
==> Installing nanoscope from uber/nanoscope
==> Downloading https://github.com/uber/nanoscope/releases/download/0.2.18/nanos
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws
######################################################################## 100.0%
🍺 /usr/local/Cellar/nanoscope/0.2.18: 13 files, 3.7MB, built in 12 seconds
➜ ~ nanoscope emulator
Zip already downloaded: /Users/i530643/.nanoscope/roms/L2Xyj8R6fKIhj37bsgVYYg==...
Launching emulator...
emulator:Android emulator version 26.0.3.0 (build_id 3965150)
emulator:Found AVD name 'nanoscope'
PANIC: Unknown AVD name [nanoscope], use -list-avds to see valid list.
HOME is defined but there is no file nanoscope.ini in $HOME/.android/avd
(Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd, and $HOME/.android/avd)

Nanoscope crashes when generating graph

image

I was recently testing my application with nanoscope (I clicked from home screen, to Activity B then back to home screen). I ended my nanoscope session to generate the graph but it seems to just crash (the browser opens, trying to load then it closes). This happens for Firefox and Chrome both. Are the number of events just too large?

Navigate trace with keyboard

Allow navigation through trace with the keyboard.

  • Move to adjacent sibling call
  • Move to next call of same method

Add to instruction that advanced profiling must be turn off

Because advanced profiling working since api 26 and above users can forgot about enabling and get failed build error com.android.builder.dexing.DexArchiveBuilderException: Failed to process
In this case they must:
Edit Configurations -> app -> Profiling tab -> uncheck Enable advanced profiling

Search behavior

Search currently searches for matches in the full signature of the method. We should probably only be searching the simple class and method name.

Segmentation fault under certain conditions

I am experiencing a segmentation fault when running nanoscope on a particular screen of my app. I'm not sure what's unique about this screen, but it's reliably reproducible.

backtrace:
    #00 pc 0000000000486f28  /system/lib64/libart.so (_ZN3art12PrettyMethodEPNS_9ArtMethodEb+64)
    #01 pc 0000000000457eb8  /system/lib64/libart.so (_ZN3art16flush_trace_dataENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPlS7_PmS8_S8_S8_+2240)
    #02 pc 000000000046d0e0  /system/lib64/libart.so (_ZNSt3__114__thread_proxyINS_5tupleIJPFvNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPlS8_PmS9_S9_S9_ES7_S8_S8_S9_S9_S9_S9_EEEEEPvSD_+164)
    #03 pc 0000000000068734  /system/lib64/libc.so (_ZL15__pthread_startPv+208)
    #04 pc 000000000001da7c  /system/lib64/libc.so (__start_thread+16)

I can supply the tombstone if necessary, although I think I would need to verify that there's no compromising information in the dump?

Nanoscope on emulator with multiple devices

Can we do one of the following?

  • support passing -s DEVICE_ID to target nanoscope command at one of many open emulators
  • improve the error message for running nanoscope emulator when there are multiple emulators open? Currently it just says:

The OS running on your device is not supported. In order to install the Nanoscope ROM, run the following...

Jitter at high zoom levels

When we're zoomed-in very too far, scrolling and zoom begins to jitter. The reason for the jitter is that the translation component of the transformation matrix is very large in these cases. We're attempting to adjust the translation by a small amount on a scroll event but the resulting translation is rounded to the nearest integer value.

Post Public Release Cleanup Tasks

  • ./gradlew uploadRelease currently points homebrew update to a public s3 URL since we can't rely on GitHub releases while the repo is private. We need to update the task to point to the GitHub release URL after public release.
  • ROM_URL points to s3 url while the repo is private. Update this to point to GitHub Releases once public.
  • The installation instructions show this command:
    • brew tap uber/nanoscope [email protected]:uber/homebrew-nanoscope.git
    • Once public, use brew tap uber/nanoscope

Support export as systrace file or chrome trace html?

There are more details that a chrome trace html can provide, such as "Alerts" and thread info, vsync barrier. I am wondering is it possible to export / generate a systrace file or chrome trace html instead of nanoscope version one?

Control trace start and end

request a feature to get a small range trace ,like begin MainActivity.onCreate to MainActivity.onResume all method traces.

Android on emulator loads infinitely

I wanted to try nanoscope on emulator, installed it from Homebrew, launched the emulator with nanoscope emulator but the emulator never finished launching. Unfortunately, I don't know what information I need to provide so you can reproduce this issue. But I'm ready to try it again and send you some logs.

"nanoscope emulator" command fails with "no such file or directory"

I just installed nanoscope for the first time and get this when I try to run it. my $ANDROID_HOME is set.

$ nanoscope emulator
Zip already downloaded: /Users/munn/.nanoscope/roms/MZqhtX7x1poNum1SotQmpw==...
Launching emulator...
./emulator.sh: line 12: /Users/munn/Library/Android/sdk/emulator/emulator64-x86: No such file or directory

Any ideas how to fix it?

[Feature request] Having a way to spot calls that takes more than 16ms

Hi, I just gave the tool a try and it's really nice!

I'd like to know on which thread a method is called if that's possible (maybe even group them with some color by thread or something). Currently I can see which methods are called when, the time they take and average time of calls but on android it would be nice to know on which thread they're called (especially if on the UIThread).

I know there is the StrictMode to detect database/network/long calls on the UIThread but it doesn't work in all cases.

Thanks!

Highlight selected call

A selected call is currently shown via crosshairs. We should also highlight the selected cell.

0.2.19 flash fail

I want to upgrade to version 0.2.19, but the nanoscope flash command execution fails:

Checking 'product'                                 OKAY [  0.019s]
Snapshot cancel                                    FAILED (remote: 'unknown command')
fastboot: error: Command failed
Flash failed: 1

brew install fail,How to fix it?

seekting@seekting:~$ brew install nanoscope
Error: cannot load such file -- os/linux/glibc
Please report this bug:
https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
/home/seekting/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/glibc.rb:1:in load_formula' /home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:21:in module_eval'
/home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:21:in load_formula' /home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:34:in load_formula_from_path'
/home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:83:in load_file' /home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:74:in klass'
/home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:70:in get_formula' /home/seekting/.linuxbrew/Library/Homebrew/formulary.rb:207:in factory'
/home/seekting/.linuxbrew/Library/Homebrew/formula.rb:1186:in []' /home/seekting/.linuxbrew/Library/Homebrew/cmd/install.rb:200:in check_ld_so_symlink'
/home/seekting/.linuxbrew/Library/Homebrew/cmd/install.rb:213:in perform_preinstall_checks' /home/seekting/.linuxbrew/Library/Homebrew/cmd/install.rb:91:in install'
/home/seekting/.linuxbrew/Library/brew.rb:84:in `

'

Option to specify package name

Today, the client traces the process of the currently foregrounded activity. For startup tracing, it's necessary to be able start tracing and to specify the process before the process is started. Add an option to specify the process name:

nanoscope start --package=com.example

Download raw trace button

Add the ability to download the raw trace data. This isn't a common case so the functionality should be somewhat hidden.

Improve Search UI

  • Settle on search designs
  • Use up/down arrows to navigate search results

Emulator Build

Distribute build for emulator. Possibly allow launching with nanoscope command-line tool.

We'll probably want an x86 emulator to make use of HAXM. This means we'll need to add support into the x86 compiler and update some ARM-specific code in the interpreter.

Original comment on Reddit:

It would be awesome if you guys could package up an emulator image with it already installed.
I really want to use this, but I can't justify going down the rabbit hole of building a custom os then figuring out how to put it on an emulator, all to use a third party tool that may or many not actually solve any of our problems.
Not to knock any of the work you guys are doing, this is awesome stuff, but the entry complexity is still very high if you don't happen to have an extra N6P lying around.

Mitigate OOMs

Large traces cause OOMs when generating the HTML, which is unsurprising based on how inefficient that logic is. Update the generation piece to be more memory efficient.

libart.so build with error on linux

Main Error: fatal error: 'sys/_system_properties.h' file not found

Build Environment :

os: Ubuntu 16.04
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.1
TARGET_PRODUCT=x86emu_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
TARGET_CPU_VARIANT=
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-21-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NMF26O
OUT_DIR=out

ERROR MESSAGE:

[ 1% 537/31800] host C++: libart <= art/runtime/runtime.cc
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I external/gtest/include -I external/icu/icu4c/source/common -I external/lz4/lib -I external/valgrind/include -I external/valgrind -I external/vixl/src -I external/zlib -I bionic/libc/private -I art/cmdline -I art/sigchainlib -I art -I art/runtime -I out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates -I out/host/linux-x86/gen/SHARED_LIBRARIES/libart_intermediates -I libnativehelper/include/nativehelper $(cat out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem out/host/linux-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -target x86_64-linux-gnu -Wsign-promo -Wno-inconsistent-missing-override --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu -DBUILDING_LIBART=1 -Wthread-safety -Wthread-safety-negative -Wimplicit-fallthrough -Wfloat-equal -Wint-to-void-pointer-cast -Wused-but-marked-unused -Wdeprecated -Werror -Wunused-result -Wunreachable-code-break -Wunreachable-code-return -Wmissing-noreturn -fno-omit-frame-pointer -fno-rtti -std=gnu++11 -ggdb3 -Wall -Werror -Wextra -Wstrict-aliasing -fstrict-aliasing -Wunreachable-code -Wredundant-decls -Wshadow -Wunused -fvisibility=protected -DART_DEFAULT_GC_TYPE_IS_CMS -DIMT_SIZE=64 -DART_BASE_ADDRESS=0x60000000 -DART_DEFAULT_INSTRUCTION_SET_FEATURES=default -DART_ENABLE_CODEGEN_arm -DART_ENABLE_CODEGEN_arm64 -DART_ENABLE_CODEGEN_mips -DART_ENABLE_CODEGEN_mips64 -DART_ENABLE_CODEGEN_x86 -DART_ENABLE_CODEGEN_x86_64 -DART_BASE_ADDRESS_MIN_DELTA=-0x1000000 -DART_BASE_ADDRESS_MAX_DELTA=0x1000000 -DART_DEFAULT_INSTRUCTION_SET_FEATURES="default" -O3 -Wframe-larger-than=2700 -fPIC -D_USING_LIBCXX -std=gnu++14 -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.d -o out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.o art/runtime/runtime.cc ) && (cp out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.d out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.P; sed -e 's/#.//' -e 's/^[^:]: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.d >> out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.P; rm -f out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/runtime.d )"

In file included from art/runtime/runtime.cc:59:
art/runtime/nanoscope_propertywatcher.h:33:10: fatal error: 'sys/_system_properties.h' file not found
#include <sys/_system_properties.h>
^
1 error generated.

[ 1% 537/31800] host C++: libart <= art/runtime/thread.cc
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I external/gtest/include -I external/icu/icu4c/source/common -I external/lz4/lib -I external/valgrind/include -I external/valgrind -I external/vixl/src -I external/zlib -I bionic/libc/private -I art/cmdline -I art/sigchainlib -I art -I art/runtime -I out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates -I out/host/linux-x86/gen/SHARED_LIBRARIES/libart_intermediates -I libnativehelper/include/nativehelper $(cat out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem out/host/linux-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -target x86_64-linux-gnu -Wsign-promo -Wno-inconsistent-missing-override --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu -DBUILDING_LIBART=1 -Wthread-safety -Wthread-safety-negative -Wimplicit-fallthrough -Wfloat-equal -Wint-to-void-pointer-cast -Wused-but-marked-unused -Wdeprecated -Werror -Wunused-result -Wunreachable-code-break -Wunreachable-code-return -Wmissing-noreturn -fno-omit-frame-pointer -fno-rtti -std=gnu++11 -ggdb3 -Wall -Werror -Wextra -Wstrict-aliasing -fstrict-aliasing -Wunreachable-code -Wredundant-decls -Wshadow -Wunused -fvisibility=protected -DART_DEFAULT_GC_TYPE_IS_CMS -DIMT_SIZE=64 -DART_BASE_ADDRESS=0x60000000 -DART_DEFAULT_INSTRUCTION_SET_FEATURES=default -DART_ENABLE_CODEGEN_arm -DART_ENABLE_CODEGEN_arm64 -DART_ENABLE_CODEGEN_mips -DART_ENABLE_CODEGEN_mips64 -DART_ENABLE_CODEGEN_x86 -DART_ENABLE_CODEGEN_x86_64 -DART_BASE_ADDRESS_MIN_DELTA=-0x1000000 -DART_BASE_ADDRESS_MAX_DELTA=0x1000000 -DART_DEFAULT_INSTRUCTION_SET_FEATURES="default" -O3 -Wframe-larger-than=2700 -fPIC -D_USING_LIBCXX -std=gnu++14 -nostdinc++ -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.d -o out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.o art/runtime/thread.cc ) && (cp out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.d out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.P; sed -e 's/#.//' -e 's/^[^:]: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.d >> out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.P; rm -f out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/thread.d )"
art/runtime/thread.cc:278:3: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
system(mkdirs.c_str());
^~~~~~ ~~~~~~~~~~~~~~
1 error generated.

OSS Review

  • Needs top title for repo
  • Needs contributing guidelines in Readme
  • Add license to Readme and add license file to repo
  • Needs Travis file for builds and verification.
  • This is referencing the rom version on AWS, where is the code for the rom and the viewer? Separate Repo, if so, what's the plan to communicate those?

The Readme feels really light right now, definitely flesh out with a better description and some value propositions this has.

cc @briankhsieh

Upgrade Strategy for Breaking Changes

There are two scenarios to consider here:

  1. Visualizer/command is newer than the ROM.
  2. Visualizer/command is older than the ROM.

Note: Case (2) is far less frequent and is only possible in the following scenario:

  • Device is flashed with nanoscope client version V.
  • A nanoscope client with version < V is used to trace the device.

This could happen if a user downgrades their nanoscope command or traces their device from another computer.

Proposed Solution

The nanoscope command and the Nanoscope ROM will each be versioned using semantic versioning. Matching major (and minor?) version numbers indicate that the command and the ROM are compatible with one another. The nanoscope command will check this condition before the execution of every command and display an upgrade message if the check fails. These are the messages for each scenario above:

Please update your Nanoscope ROM:
    Nanoscope Client version: 2.1.0
    Nanoscope ROM version: 1.0.0

To update your ROM, run the following commands:
    brew update && brew upgrade nanoscope
    nanoscope flash
Please update your Nanoscope Client:
    Nanoscope Client version: 1.0.0
    Nanoscope ROM version: 2.1.0

To update your client, run the following commands:
    brew update && brew upgrade nanoscope
Determining ROM Version

Before packaging our ROM, update the out/target/product/angler/system/build.prop to include this property:

build.prop

ro.build.nanoscope=1.0.0

The Nanoscope client will query this system property to determine compatibility. We already have a release script at art/make-release.sh. The script should be updated to include logic to update the build.prop file.

Alternatives Considered

Catch exceptions

Nanoscope client optimistically parses the trace file. If parsing fails, we'll display a message suggesting to either upgrade the visualizer or device. There are a couple serious issues with this approach:

  1. We won't know whether the user should upgrade the client or the ROM.
  2. Incompatibility may not cause parsing to fail, in which case we'll render the trace incorrectly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.