Age | Commit message (Collapse) | Author |
|
Change-Id: I89ee8b33d0dedc24ea561465dddcd17aebabf2a2
|
|
Change-Id: I69352c43c8f8a5ae717d7301c7164ddbf99823fd
|
|
The memory allocation function was allocating a number of bytes in the
heap, traversing all of them page by page to make sure all the addresses
were mapped with physical pages, and the memory released with the
destructor. While the memory is allocated, there is no way of knowing if
the kernel swaps it out.
To remove this level of uncertainty, instead of overcoming the lazy page
allocation manually, ask the kernel to allocate a resident memory region
for us.
In addition to that, let the user decide at what stages of the
instruction the memory should be freed:
1. like before, until the destructor;
2. after every execution;
3. after the last "repeat".
Test: inspection with Perfetto
Bug: 339590280
Change-Id: If139971222af56ad3f5aaf2f96d09122a27f8259
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Instead of running instructions as soon as possible, create a delay on
the first execution of a repeated execution.
A repeated instruction is able to reiterate every period_us, but the
timeline can be shifted with the newly introduced parameter offset_us.
Test: Trace evaluation with Perfetto shows that the first execution is
delayed
Bug: 339590280
Change-Id: I33fed7a361e75b8aba8b54466cb485ff85618e13
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
This is just a cosmetic name change.
Test: build
Bug: 339590280
Change-Id: I9c5971dfd1acf1a5c3c6a4e1f41fe3265a7d4c1c
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Timing is important in Ditto, and the logger should be helpful when
identifying timing issues.
This patch extends the logger with date and time.
In addition, it attemps to improve the log visibility with the following
format:
[DATE/TIME] LOGLEVEL FILE/LINE ERROR [ERRNO]
Test: visual inspection
Bug: 339590280
Change-Id: I568171cf322a813dbcee1176e4b19644e6b9b8e7
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Change-Id: I7fb8d52c048355d4bf4c5e7f1d8661358fce4cf1
|
|
|
|
Test: example/android/binder_nested_parcel.ditto
Bug: 323841271
Change-Id: I4cba1f58f0d8a5fd5c834aa42dc01621f7e1a7d0
|
|
Change-Id: I59349f215adebdb8ba59408df45c7dd673be5745
|
|
|
|
Change-Id: Icaec33861fe68acfb7cfe341d5044982b43d0b36
|
|
In version 22.x, the JSON conversion functions return
absl::Status, which is marked nodiscard. Check the ok() function
before printing the output.
Bug: 329747255
Test: presubmit
Change-Id: I46e2f20a26953dc6501f51daecc1a56547a326ab
|
|
Change-Id: I62f021447725e08a8ab65213568fbb5a4447d254
|
|
When printing the benchmarking results, instead of reporting the
process/thraed name, Dittobench was only printing the numerical
identifier of the process/thread. This was enough to distinguish the
instructions run from one process/thread to another, but not enough to
understand what process/thread called them.
Additionally, this numerical value was only referring to the id of the
"spawned" processes, so if multiple threads were generated manually, and
each of them was using the default "spawn" value of 1, their reported
instruction identifier would have been "0".
Fix by using the thread name if available, otherwise the instruction
number.
Test: manual check
Change-Id: If3cfbf705dd242f78a51cec995381d964872217f
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
For benchmarks that spawn multiple processes, the returned aggregated
data was lacking the mean value.
This was due to the mean value correctly exported by the child process,
but mistakenly not copied into the parent.
This patch fixes this issue.
Test: manual execution of a multiprocessing workload
Change-Id: If643932a88c95ae41145c58badfef4a61bfe1d71
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Change-Id: I072e1d1c834b2e50902a406a19da62278b217d0b
|
|
* changes:
Update protobuf header include path
Move gettid and sched_setattr to Syscall interface
Move SchedAttr__ to syscall
|
|
When building the project with Kleaf, the root path is different from
the Dittosuite root, causing the protobuffer-generated headers to not be
found in the expected folder.
After several attemps, the simplest solution that unifies Android.bp,
CMake and Bazel is to explicitly include the PB directory "schema". This
works for both CMake and Bazel, and is also what was is done by Android
by default.
The `#ifdef __ANDROID__` condition to choose if including
`<benchmark.pb.h>` or `"schema/benchmark.pb.h"` is not needed anymore,
as `<benchmark.pb.h>` now works in both cases.
Bug: 322744630
Test: bazel build --enable_bzlmod --config=internet \
//test/dittosuite:dittobench # From common-android-mainline
Change-Id: Ibb90679689178169add35c866c4935f30686ccc0
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Moving function calls that are strictly depending on the platform into
an external redirection that complies to the SyscallInterface interface
is a design pattern that should have been always followed.
Not complying to this design pattern can cause issues, for example when
building the tool with Kleaf, whose build environment does not support
some of the latest syscalls.
Fix by moving these function calls into the Syscall interface and
implementing them in a more baremetal fashion.
Bug: 322744630
Test: build, run on Android
Change-Id: I2e9806373868fadd54f9d500346aaab424e34539
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
As part of a refactoring required to implement functions not yet
available in the libraries provided by Kleaf's sysroot, move the data
structure that mimicks sched_attr in sched/types.h into the
syscall-related code.
Test: build
Bug: 322744630
Change-Id: I05ca8ffb2ef36b29708dfc0340635fb2c2162037
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Change-Id: Ifb5813c7e3ba50dfefb5d9203f8475628f9a6e8f
|
|
40b07b8734
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2950485
Change-Id: Ifacd947607ed8eee0b79f31686690da15574a5f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
Intent support isn't complete yet
Test: Pixel 7 with example/android/binder_gen.ditto
Bug: 323841271
Change-Id: Ie7eb650b119ea120ea3935ec51ec28fc0b9dc8f1
|
|
Change-Id: I8a9b7c73e3262177b372c05c7e82c2726d65659d
|
|
415067aab6
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2945340
Change-Id: I2b0841482e1e1edeb2f53c3e68eb90933f38008b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
Change-Id: I455a6f7e475ac9ceba4d215ff818b552f327d5b4
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2943527
Change-Id: I50492644a7884da0f41f1f20678245d36bbd3caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2943526
Change-Id: I838ef26d36e6502d8279250ab6f38f2f6c30d638
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2917386
Change-Id: I72fa7d8dc3d7dfc1dc567d62d45b1ccd63bc5a77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Create the test target that groups all the tests in the project.
Test: bazel test dittobench_test
Bug: 322744630
Change-Id: Ic6e0ffc7ca8fbe88e7e73c0a0446e0d397982e3b
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
This CL is created as a best effort to migrate test targets to the new Android ownership model.
It is based on historical data from repository history and insights from git blame.
Given the nature of this effort, there may be instances of incorrect attribution. If you find incorrect or unnecessary
attribution in this CL, please create a new CL to fix that.
For detailed guidelines and further information on the migration please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: I18358fe58a359c04a1755dd45c1f4407b9edd325
|
|
Apply some good practices in unit testing, such as parameterized tests,
and the arrange, act, assert structure.
Test: test
Bug: 322744630
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: Id52a7c770b33fa623e8c07199a72ba9e6c7ef683
|
|
Create all the build configuration to be able to build dittosuite with
Bazel.
The tricky part is the Protocol Buffer dependency, which is solved in
the MODULE.bazel file. This works fine if the project is built
standalone, but when imported as part of another Bazel project, the
WORKSPACE dependency is not met, and the build fails.
Test: bazel build :all
Bug: 322744630
Change-Id: Icaeffb26b5251d1ff33755eb79af528cfb2c8d58
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Change-Id: I723cc8bb10aca74ec2f2d6afc5d0bb06f46dab04
|
|
am: 1b63359296
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2897520
Change-Id: Ibc0252d237c0105f5da08b4612d2aabcfc9310f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2897520
Change-Id: Ic92bdd7c85fd99f2364c7e63242c617d255d25e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2897520
Change-Id: I4f66b7ceeb4bc85970bb511bc7b16a6eab8cf1de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Apparently, while in amd64 Cuttlefish the sync() DittoBinder transaction
was working fine, in arm64 (tried in Pixel 7), some kind of type
conversion is transforming a signed integer into an unsigned integer.
This results in an error such as:
dittosuite/src/binder_request.cpp:35: FATAL: Wrong result, expected: -2, but got: 254
Apparently changing char to int8_t in the requester code is enough to
prevent this conversion.
Test: Pixel 7 and CF: dittobench example/android/binder.ditto
Bug: 318651715
Change-Id: Ic05d70d72419fef089287781c5eed8247bf05763
Signed-off-by: Alessio Balsini <balsini@google.com>
|
|
Change-Id: I4ce7baea23bb3da6486377e83e178e0f897e9b6f
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2794733
Change-Id: I2f1b70955a4603975d04c068d0aaa08e2eded3f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2785983
Change-Id: Ie44cab6f3577ca8135d40a186336cb7c4a2ef819
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
440b812810
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2788472
Change-Id: Ie3fd0b71556b45d8683033f28f83b0ae4541015e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2794733
Change-Id: I5ce2be2d1c82918e656718c444768ade10d69ae3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2785983
Change-Id: I804b36512778002c5668f9b12993030a3fb84d6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2788472
Change-Id: I45406768acf84298ff322f78f8dcf8143dbfef95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Change-Id: I08385af58fc145c1d4ab74cbdd1c6e9d1f164d18
|
|
Original change: https://android-review.googlesource.com/c/platform/test/dittosuite/+/2794733
Change-Id: Iaa891e317d3dc2b2a17adacc9da451bbde1432d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|