Add agent for printing breakpoints

This can be used to test performance of breakpointed code in a
lightweight way or to ensure that code is reaching expected locations.

See tools/breakpoint-logger/README.md for information on how to use.

Also added the ability to pass explicit agents for run-test to load
before running tests.

Test: ./test/run-test                                                 \
        --host                                                        \
        --dev                                                         \
        --with-agent                                                  \
        'libbreakpointlogger.so=LMain;->main([Ljava/lang/String;)V@0' \
        001-HelloWorld

Bug: 68259370

Change-Id: I409c940a34b1e823ec50649cdb3c51e5a81a09ab
diff --git a/test/run-test b/test/run-test
index 09a70e5..fdb2ee4 100755
--- a/test/run-test
+++ b/test/run-test
@@ -291,6 +291,11 @@
     elif [ "x$1" = "x--debug-wrap-agent" ]; then
         run_args="${run_args} --debug-wrap-agent"
         shift
+    elif [ "x$1" = "x--with-agent" ]; then
+        shift
+        option="$1"
+        run_args="${run_args} --with-agent $1"
+        shift
     elif [ "x$1" = "x--debug-agent" ]; then
         shift
         option="$1"
@@ -661,6 +666,7 @@
         echo "                          only supported on host."
         echo "    --debug-wrap-agent    use libwrapagentproperties and tools/libjdwp-compat.props"
         echo "                          to load the debugger agent specified by --debug-agent."
+        echo "    --with-agent <agent>  Run the test with the given agent loaded with -agentpath:"
         echo "    --debuggable          Whether to compile Java code for a debugger."
         echo "    --gdb                 Run under gdb; incompatible with some tests."
         echo "    --gdb-arg             Pass an option to gdb."