kernel_variant.xml:
- CONFIG_DYNAMIC_DEBUG=y
- CONFIG_PRINTK_TIME=y
- CONFIG_LOG_BUF_SHIFT=18
- CONFIG_KALLSYMS=y
def flatten(coll): | |
for i in coll: | |
if isinstance(i, (list, tuple)): | |
for j in flatten(i): | |
yield j | |
else: | |
yield i |
def median(l): | |
sortedl = sorted(l) | |
mid = (len(sortedl) -1) // 2 | |
if (len(sortedl)) % 2: | |
return (sortedl[mid] + sortedl[mid+1]) / 2.0 | |
else: | |
return sortedl[mid] |
// Get stacks for every thread | |
import java.util.*; | |
Map<Thread, StackTraceElement[]> map = Thread.getAllStackTraces(); | |
for (Thread key : map.keySet()) { | |
for (StackTraceElement ste : map.get(key)) { | |
Log.e(TAG, "TRACE: (" + key.toString() + ":" + key.getId() + ") " + ste); | |
} | |
} |
kernel_variant.xml:
#!/usr/bin/python | |
from __future__ import print_function | |
import os, sys, getopt | |
searchstring = "" | |
def usage(): | |
print (os.path.basename(sys.argv[0]) + ' [-s search_string] -i <inputfile>') |
grep "dex2oat took" logcat.log | sed 's/\ms//g' | column -t -s ' ' | gawk '{ sum += $10 } END { print sum}' |
# Doxyfile 1.8.6 | |
# This file describes the settings to be used by the documentation system | |
# doxygen (www.doxygen.org) for a project. | |
# | |
# All text after a double hash (##) is considered a comment and is placed in | |
# front of the TAG it is preceding. | |
# | |
# All text after a single hash (#) is considered a comment and will be ignored. | |
# The format is: |
#include <time.h> | |
unsigned long us_time() | |
{ | |
struct timeval tv; | |
gettimeofday(&tv, NULL); | |
return tv.tv_sec*(uint64_t)1000000+tv.tv_usec; | |
} | |
#define ENTER printf("%ld enter %s (%d)\n", us_time(), __FUNCTION__, gettid()) | |
#define EXIT printf("%ld exit %s (%d)\n", us_time(), __FUNCTION__, gettid()) |
# Get a list of all the repos | |
repo forall -c 'echo $REPO_PROJECT; git status -s' | |
# Just list the changed repos | |
repo forall -c 'if [ "$(git status --porcelain)" != "" ]; then echo $REPO_PROJECT; fi' | |
# Print the contents, also only include projects from given list | |
repo forall $(cat projects) -c 'if [ "$(git status --porcelain)" != "" ]; then echo $REPO_PROJECT; git status -s; fi' | |
# Check both branch and (un)staged commits |
#!/bin/bash | |
KERNELS=`ls /boot | grep vmlinuz | cut -d'-' -f2,3` | |
echo Available kernels: $KERNELS | |
KERNCOUNT=`echo $KERNELS | wc -w` | |
if [ $KERNCOUNT -gt 2 ]; | |
then | |
OLDEST=`echo "${KERNELS%% *}" | head -1` | |
PACKAGES=`dpkg -l | grep ^ii |grep $OLDEST | awk -F' ' '{ print $2 }'` | |
echo "Oldest package (to be removed): $OLDEST" |