summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmds/dumpstate/dumpstate.c9
-rw-r--r--include/utils/Trace.h2
-rw-r--r--libs/utils/Trace.cpp4
3 files changed, 12 insertions, 3 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index f3fcca0..8718bb6 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -188,6 +188,12 @@ static void dumpstate() {
run_command("WIFI NETWORKS", 20,
SU_PATH, "root", "wpa_cli", "list_networks", NULL);
+#ifdef FWDUMP_bcmdhd
+ run_command("DUMP WIFI INTERNAL COUNTERS", 20,
+ SU_PATH, "root", "wlutil", "counters", NULL);
+#endif
+ dump_file("INTERRUPTS (1)", "/proc/interrupts");
+
property_get("dhcp.wlan0.gateway", network, "");
if (network[0])
run_command("PING GATEWAY", 10, SU_PATH, "root", "ping", "-c", "3", "-i", ".5", network, NULL);
@@ -197,12 +203,13 @@ static void dumpstate() {
property_get("dhcp.wlan0.dns2", network, "");
if (network[0])
run_command("PING DNS2", 10, SU_PATH, "root", "ping", "-c", "3", "-i", ".5", network, NULL);
-#ifdef FWDUMP_bcm4329
+#ifdef FWDUMP_bcmdhd
run_command("DUMP WIFI STATUS", 20,
SU_PATH, "root", "dhdutil", "-i", "wlan0", "dump", NULL);
run_command("DUMP WIFI INTERNAL COUNTERS", 20,
SU_PATH, "root", "wlutil", "counters", NULL);
#endif
+ dump_file("INTERRUPTS (2)", "/proc/interrupts");
print_properties();
diff --git a/include/utils/Trace.h b/include/utils/Trace.h
index 93e2285..41bce00 100644
--- a/include/utils/Trace.h
+++ b/include/utils/Trace.h
@@ -54,6 +54,8 @@
#define ATRACE_TAG_CAMERA (1<<10)
#define ATRACE_TAG_LAST ATRACE_TAG_CAMERA
+#define ATRACE_TAG_NOT_READY (1LL<<63) // Reserved for use during init
+
#define ATRACE_TAG_VALID_MASK ((ATRACE_TAG_LAST - 1) | ATRACE_TAG_LAST)
#ifndef ATRACE_TAG
diff --git a/libs/utils/Trace.cpp b/libs/utils/Trace.cpp
index 5cd5731..f5aaea3 100644
--- a/libs/utils/Trace.cpp
+++ b/libs/utils/Trace.cpp
@@ -25,7 +25,7 @@ namespace android {
volatile int32_t Tracer::sIsReady = 0;
int Tracer::sTraceFD = -1;
-uint64_t Tracer::sEnabledTags = 0;
+uint64_t Tracer::sEnabledTags = ATRACE_TAG_NOT_READY;
Mutex Tracer::sMutex;
void Tracer::changeCallback() {
@@ -46,7 +46,7 @@ void Tracer::init() {
sTraceFD = open(traceFileName, O_WRONLY);
if (sTraceFD == -1) {
ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
- // sEnabledTags remains zero indicating that no tracing can occur
+ sEnabledTags = 0; // no tracing can occur
} else {
loadSystemProperty();
}