GithubHelp home page GithubHelp logo

uber / nanoscope-art Goto Github PK

View Code? Open in Web Editor NEW
48.0 9.0 16.0 34 MB

License: Apache License 2.0

Makefile 0.93% Shell 0.70% C++ 64.77% Java 15.48% Assembly 15.32% C 0.21% Python 0.88% Smali 1.69% HTML 0.01% CSS 0.01% Perl 0.01%

nanoscope-art's Introduction

This is the AOSP fork component of Nanoscope.

See the Nanoscope wiki for more details.

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-art's People

Contributors

aartbik avatar agampe avatar allight avatar bdcgoogle avatar captain5050 avatar cferris1000 avatar chih-hung avatar colincross avatar crlarsen-it avatar danalbert avatar davidbrazdil avatar dimitry- avatar dsrbecky avatar enh-google avatar eugenis avatar hboehm avatar hjyamauchi avatar iam avatar jeffyhao avatar kruton avatar loganchien avatar mendell27 avatar mingyaoy avatar narayank avatar pszc avatar richard-uhler avatar roland-levillain avatar stephenhines avatar vmarko avatar zheng-xu 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanoscope-art's Issues

Build with error on Ubuntu 16.04

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.

Sanitize Class and Method name before writing trace file

When a non ascii character is found in the trace, the html generation ends with an empty file and chrome://tracing is not able to open the trace file.
I removed these chars manually and it works fine after. I'm opening this task noting all the ones I found.

{"cat": "PERF", "ph": "X", "pid": 1, "name": "ClassLinker.DefineClass", "tid": 1, "ts": "2682030", "dur": "107", "args": {"fullName": "Class ClassLinker.DefineClass()#H��×_expvL�2e®¾ÿ�"}},
{"cat": "PERF", "ph": "X", "pid": 1, "name": "ClassLinker.DefineClass", "tid": 1, "ts": "7797364", "dur": "158", "args": {"fullName": "Class ClassLinker.DefineClass()#ÿ��"}},
{"cat": "PERF", "ph": "X", "pid": 1, "name": "ClassLinker.DefineClass", "tid": 1, "ts": "3334911", "dur": "429", "args": {"fullName": "Class ClassLinker.DefineClass()# ßÐH

Inlining fix

Was the problem with inlining in the compiled code instrumentation fixed internally? If so, how was it fixed?
8e6e20c

ART stack frame size recommendation

Problem:
During compilation, the compiler gave a warning stating the stack frame size of 4220 bytes in art::NanoscopeSampler::signal_handler and aborted compilation (exact error message is at the bottom). I believe the source of the problem originates from allocating a 4K char buffer in runtime/nanoscope_sample.cc:136. The maximum stack size isn't clear from the documentation, but is designed to generate warning if its larger than 2700, 6000 or 1728 bytes according to build/Android.common_build.mk:346-350 depending on different mode.

Questions:

  • What's the proper way to get around this build issue?
  • Is there any unintended side affect to increase the -Wframe-larger-than parameter a larger size?

Full compilation error message:

[  0% 2/20201] target  C++: libart_32 <= art/runtime/nanoscope_sampler.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/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates -I out/target/product/generic_x86_64/gen/SHARED_LIBRARIES/libart_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/generic_x86_64/obj_x86/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 out/target/product/generic_x86_64/obj/include -isystem bionic/libc/arch-x86/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-x86 -isystem bionic/libm/include -isystem bionic/libm/include/i387 -c    -fno-exceptions -Wno-multichar -O2 -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -ffunction-sections -fno-short-enums -fstrict-aliasing -funwind-tables -fstack-protector-strong -m32 -no-canonical-prefixes -march=prescott -msse4 -msse4.1 -msse4.2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -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 -nostdlibinc    -msse3 -target i686-linux-android -Bprebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin -mstackrealign    -Wsign-promo  -Wno-inconsistent-missing-override -nostdlibinc     -fno-rtti -DBUILDING_LIBART=1 -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_TARGET -DART_BASE_ADDRESS=0x70000000 -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 -O3 -Wframe-larger-than=1728 -fPIC -DART_DEFAULT_INSTRUCTION_SET_FEATURES=\"default\" -D_USING_LIBCXX -Wthread-safety -Wthread-safety-negative -Wimplicit-fallthrough -Wfloat-equal -Wint-to-void-pointer-cast -Wused-but-marked-unused -Wdeprecated -Wunreachable-code-break -Wunreachable-code-return -Wmissing-noreturn -std=gnu++14  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type    -MD -MF out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.d -o out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.o art/runtime/nanoscope_sampler.cc ) && (cp out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.d out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.d >> out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.P; rm -f out/target/product/generic_x86_64/obj_x86/SHARED_LIBRARIES/libart_intermediates/nanoscope_sampler.d )"
art/runtime/nanoscope_sampler.cc:134:24: error: stack frame size of 4220 bytes in function 'art::NanoscopeSampler::signal_handler' [-Werror,-Wframe-larger-than=]
void NanoscopeSampler::signal_handler(int sigo ATTRIBUTE_UNUSED, siginfo_t *siginfo ATTRIBUTE_UNUSED, void *ucontext ATTRIBUTE_UNUSED) {
                       ^
1 error generated.```

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.