211 research outputs found
Automated Test Input Generation for Android: Are We There Yet?
Mobile applications, often simply called "apps", are increasingly widespread,
and we use them daily to perform a number of activities. Like all software,
apps must be adequately tested to gain confidence that they behave correctly.
Therefore, in recent years, researchers and practitioners alike have begun to
investigate ways to automate apps testing. In particular, because of Android's
open source nature and its large share of the market, a great deal of research
has been performed on input generation techniques for apps that run on the
Android operating systems. At this point in time, there are in fact a number of
such techniques in the literature, which differ in the way they generate
inputs, the strategy they use to explore the behavior of the app under test,
and the specific heuristics they use. To better understand the strengths and
weaknesses of these existing approaches, and get general insight on ways they
could be made more effective, in this paper we perform a thorough comparison of
the main existing test input generation tools for Android. In our comparison,
we evaluate the effectiveness of these tools, and their corresponding
techniques, according to four metrics: code coverage, ability to detect faults,
ability to work on multiple platforms, and ease of use. Our results provide a
clear picture of the state of the art in input generation for Android apps and
identify future research directions that, if suitably investigated, could lead
to more effective and efficient testing tools for Android
Effective memory management for mobile environments
Smartphones, tablets, and other mobile devices exhibit vastly different constraints compared to regular or classic computing environments like desktops, laptops, or servers. Mobile devices run dozens of so-called âappsâ hosted by independent virtual machines (VM). All these VMs run concurrently and each VM deploys purely local heuristics to organize resources like memory, performance, and power. Such a design causes conflicts across all layers of the software stack, calling for the evaluation of VMs and the optimization techniques specific for mobile frameworks.
In this dissertation, we study the design of managed runtime systems for mobile platforms. More specifically, we deepen the understanding of interactions between garbage collection (GC) and system layers. We develop tools to monitor the memory behavior of Android-based apps and to characterize GC performance, leading to the development of new techniques for memory management that address energy constraints, time performance, and responsiveness.
We implement a GC-aware frequency scaling governor for Android devices. We also explore the tradeoffs of power and performance in vivo for a range of realistic GC variants, with established benchmarks and real applications running on Android virtual machines. We control for variation due to dynamic voltage and frequency scaling (DVFS), Just-in-time (JIT) compilation, and across established dimensions of heap memory size and concurrency. Finally, we provision GC as a global service that collects statistics from all running VMs and then makes an informed decision that optimizes across all them (and not just locally), and across all layers of the stack.
Our evaluation illustrates the power of such a central coordination service and garbage collection mechanism in improving memory utilization, throughput, and adaptability to user activities. In fact, our techniques aim at a sweet spot, where total on-chip energy is reduced (20â30%) with minimal impact on throughput and responsiveness (5â10%). The simplicity and efficacy of our approach reaches well beyond the usual optimization techniques
Applications of information sharing for code generation in process virtual machines
As the backbone of many computing environments today, it is important that process virtual
machines be both performant and robust in mobile, personal desktop, and enterprise applications.
This thesis focusses on code generation within these virtual machines, particularly
addressing situations where redundant work is being performed. The goal is to exploit information
sharing in order to improve the performance and robustness of virtual machines that are
accelerated by native code generation. First, the thesis investigates the potential to share generated
code between multiple threads in a dynamic binary translator used to perform instruction
set simulation. This is done through a code generation design that allows native code to be
executed by any simulated core and adding a mechanism to share native code regions between
threads. This is shown to improve the average performance of multi-threaded benchmarks by
1.4x when simulating 128 cores on a quad-core host machine. Secondly, the ahead-of-time
code generation system used for executing Android applications is improved through the use
of profiling. The thesis investigates the potential for profiles produced by individual users of
applications to be shared and merged together to produce a generic profile that still provides
a lot of benefit for a new user who is then able to skip the expensive profiling phase. These
profiles can not only be used for selective compilation to reduce code-size and installation
time, but can also be used for focussed optimisation on vital code regions of an application
in order to improve overall performance. With selective compilation applied to a set of popular
Android applications, code-size can be reduced by 49.9% on average, while installation
time can be reduced by 31.8%, with only an average 8.5% increase in the amount of sequential
runtime required to execute the collected profiles. The thesis also shows that, among the
tested users, the use of a crowd-sourced and merged profile does not significantly affect their
estimated performance loss from selective compilation (0.90x-0.92x) in comparison to when
they they perform selective compilation with their own unique profile (0.93x). Furthermore, by
proposing a new, more powerful code generator for Androidâs virtual machine, these same profiles
can be used to perform focussed optimisation, which preliminary results show to increase
runtime performance across a set of common Android benchmarks by 1.46x-10.83x. Finally,
in such a situation where a new code generator is being added to a virtual machine, it is also
important to test the code generator for correctness and robustness. The methods of execution
of a virtual machine, such as interpreters and code generators, must share a set of semantics
about how programs must be executed, and this can be exploited in order to improve testing.
This is done through the application of domain-aware binary fuzzing and differential testing
within Androidâs virtual machine. The thesis highlights a series of actual code generation and
verification bugs that were found in Androidâs virtual machine using this testing methodology,
as well as comparing the proposed approach to other state-of-the-art fuzzing techniques
Clojure on Android: Challenges and Solutions
Mobile operating systems are rapidly expanding into new areas and the importance of mobile apps is rising with them. As the most popular mobile operating system, Android is at the forefront of this development. However, while other mobile operating systems have introduced newer, officially-supported languages for app development, the only supported language for Android app development is an older dialect of Java. Android developers are unable to take advantage of the features and styles available in alternative and more modern languages.
The Clojure language compiles to Android-compatible bytecode and is a promising language to fill this gap. However, the development of Android apps with Clojure is hindered by performance concerns. One recognized problem is the slow startup time of Clojure on Android apps. Alternative ``lean'' Clojure compiler projects promise to improve Clojure performance including startup time. However, the performance of Clojure on Android and the lean compiler projects has not been systematically analyzed and evaluated.
We benchmarked and analyzed the startup and run time performance of Android apps written in Clojure and compiled using both the standard Clojure compiler and experimental lean Clojure implementations. In our experiments the run time performance of Clojure on Android is similar to that of Clojure on the desktop. However, Clojure on Android apps take a significant amount of time to start, even on relatively new hardware and the latest Android versions. Long startup times scale upwards quickly with larger apps and the problem is closely tied to the Clojure compiler implementation. We also found that while the Skummet lean Clojure compiler project significantly reduces Clojure on Android startup times, more changes are necessary to make Clojure practical for general Android app development
- âŠ