Update tracing config on git-master-art-host to use streaming am: 4c25ffc893 am: 4f188e20be am: 3d00795382

Original change: https://android-review.googlesource.com/c/platform/art/+/2320558

Change-Id: Id4997208f0b5fb88e43dcffdcdf832f629cad357
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index d6b40c6..15188e9 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -382,7 +382,8 @@
         proc_name = StringPrintf("%u", static_cast<uint32_t>(pid));
       }
 
-      std::string trace_file = StringPrintf("/data/misc/trace/%s.trace.bin", proc_name.c_str());
+      const char* path = kIsTargetBuild ? "/data/misc/trace" : "/tmp";
+      std::string trace_file = StringPrintf("%s/%s.trace.bin", path, proc_name.c_str());
       Trace::Start(trace_file.c_str(),
                    buffer_size,
                    0,   // TODO: Expose flags.
diff --git a/runtime/trace.h b/runtime/trace.h
index ab2fe8f..54799fe 100644
--- a/runtime/trace.h
+++ b/runtime/trace.h
@@ -49,7 +49,7 @@
 
 using DexIndexBitSet = std::bitset<65536>;
 
-constexpr size_t kMaxThreadIdNumber = kIsTargetBuild ? 65536U : 1048576U;
+constexpr size_t kMaxThreadIdNumber = kIsTargetBuild ? 0x10000U : 0x400000U;
 using ThreadIDBitSet = std::bitset<kMaxThreadIdNumber>;
 
 enum TracingMode {
diff --git a/test/knownfailures.json b/test/knownfailures.json
index d94e3df..07f061e 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -81,7 +81,7 @@
     },
     {
         "tests" : "629-vdex-speed",
-        "variant": "interp-ac | interpreter | no-prebuild | debuggable | trace",
+        "variant": "interp-ac | interpreter | no-prebuild | debuggable | trace | stream",
         "description": "629 requires compilation."
     },
     {
@@ -386,7 +386,7 @@
         "test_patterns": ["616-cha.*"],
         "description": ["cha tests rely on knowing the exact set of optimizations available. ",
                         "Debuggable runtimes change the set of optimizations."],
-        "variant": "debuggable | trace"
+        "variant": "debuggable | trace | stream"
     },
     {
         "test_patterns": ["616-cha.*"],
@@ -760,7 +760,7 @@
     },
     {
         "tests": ["004-StackWalk"],
-        "variant": "speed-profile | interp-ac | interpreter | jit | no-prebuild | no-image | trace | redefine-stress | jvmti-stress | debuggable",
+        "variant": "speed-profile | interp-ac | interpreter | jit | no-prebuild | no-image | trace | redefine-stress | jvmti-stress | debuggable | stream",
         "description": ["Test is designed to only check --optimizing"]
     },
     {
@@ -1308,7 +1308,7 @@
     },
     {
         "tests": ["1339-dead-reference-safe"],
-        "variant": "debuggable | trace",
+        "variant": "debuggable | trace | stream",
         "description": [ "Fails to eliminate dead reference when debuggable." ]
     },
     {
@@ -1367,12 +1367,12 @@
     },
     {
         "tests": ["2029-contended-monitors", "2043-reference-pauses"],
-        "variant": "interpreter | interp-ac | gcstress | trace",
+        "variant": "interpreter | interp-ac | gcstress | trace | stream",
         "description": ["Slow tests. Prone to timeouts."]
     },
     {
         "tests": ["2042-reference-processing"],
-        "variant": "interpreter | interp-ac | gcstress | trace | debuggable",
+        "variant": "interpreter | interp-ac | gcstress | trace | debuggable | stream",
         "description": ["Slow test. Prone to timeouts."]
     },
     {
diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py
index 1ce3284..eaf33b7 100644
--- a/test/testrunner/target_config.py
+++ b/test/testrunner/target_config.py
@@ -138,7 +138,8 @@
         }
     },
     'art-tracing' : {
-        'run-test' : ['--trace']
+        'run-test' : ['--trace',
+                      '--stream']
     },
     'art-interpreter-tracing' : {
         'run-test' : ['--interpreter',