8 Commits
Author SHA1 Message Date
Andreas Haas e9d02eb56e [benchmark] Fix C++ benchmarks build in a Chrome checkout
Update test/benchmarks/cpp/BUILD.gn and test/benchmarks/cpp/cppgc/BUILD.gn
so that fast_api_benchmark and other C++ benchmarks can be built in a
Chrome checkout (build_with_chromium) in addition to a standalone V8
checkout:

- Use relative paths (../../..:v8, ../../..:v8_libbase, etc.) instead of
  root-relative paths (//:v8) which point to the Chromium root in a
  Chrome checkout.
- Add ../../..:internal_config_base to benchmark targets so V8 include
  paths are configured when building in Chromium.
- Depend on //third_party/google_benchmark when build_with_chromium is
  true instead of //third_party/google_benchmark_chrome.
- Add //build/config/compiler:no_exit_time_destructors to cppgc
  benchmarks.
- Include "benchmark/benchmark.h" via the benchmark_config include_dirs
  instead of hardcoding the third_party/google_benchmark_chrome path.

TAG=agy
CONV=33ee5221-0921-45d8-bcc0-6413b5599ef7

Change-Id: Ia6cf7c1b8651b7808046003c16139b9c48570d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8657242
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#111149}
2026-10-26 05:59:52 -07:00
Igor Sheludko e74e6c524c [cppgc] Rename src/heap/cppgc/ to src/heap/cppgc-internal/
Rename the internal cppgc directory to src/heap/cppgc-internal/ to
clearly distinguish it from the public include/cppgc/ headers and
avoid potential naming confusion.
The collision occurs on Windows builds where -Wmicrosoft-include
is enabled by Clang in MSVC compatible mode. MSVC on Windows uses
different order of directories where the files are searched by the
compiler and `#include "cppgc/blah.h"` in public headers might end up
including "src/heap/cppgc/blah.h" if it exists.

All internal #include paths, include guards, and build configurations
(BUILD.gn and BUILD.bazel) have been updated to reflect the new path.

TAG=agy
CONV=47b06028-d652-41a8-b4f1-39e3cc478096

Bug: 515252150
Change-Id: Idf7ca1d193a8b6bb9d53b22f01320f4363df36f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7963663
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
Cr-Commit-Position: refs/heads/main@{#108143}
2026-06-22 02:41:04 -07:00
Michael Achenbach 66253e1b99 [build] Use a new google_benchmark location to avoid conflicts
Using the same path for DEPS'ed and previously checked-in files
causes conflicts when going back and forth between new and old
revisions. Since all references here are v8 stand-alone, the
exact location shouldn't be important. Therefore we use some
new name to avoid conflicts when locally running `gclient sync`.

Bug: chromium:1513046
Change-Id: Icf1ecc4d9b1f9c7e67b5a542c2be08ff9738d045
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5184217
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#91760}
2024-01-10 14:37:11 +00:00
Matthias Liedtke 51fd29ca5d Update google_benchmark (trusted)
--- Manual changes: ---

1) Updated version of google_benchmark to fix windows compile error.
  New range: https://chromium.googlesource.com/external/github.com/google/benchmark/+log/e8baf26..b177433
2) Remove unused sleep.[cc|h] from BUILD.gn. (Removed here: https://github.com/google/benchmark/pull/1549)
3) Fix deprecation warnings (treated as errors) in allocation_perf.cc.
  benchmark::DoNotOptimize has deprecated overloads due to https://github.com/google/benchmark/pull/1493.

Bug: 1425054

--- Original message generated by autoroll: ---

Rolling v8/third_party/google_benchmark/src: https://chromium.googlesource.com/external/github.com/google/benchmark/+log/e8baf26..efc89f0

link to benchmark directly for tests that aren't link_main_test (#1576) (dominic)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/efc89f0

Convert uses of `const char*` to `std::string` (#1567) (dominic)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/46d3c84

add '@' to correctly reference build file for libpfm (#1575) (dominic)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/68aa190

Address warnings on NVIDIA nvc++ (#1573) (Henrique Bucher)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/9f7dc38

simplify setting C++ standard (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/1b507cb

[FR] Provide public accessors to benchmark name and arguments #1551 (#1563) (Mike Apodaca)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/f32748c

use std::string for skip messages (#1571) (dominic)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/060d762

[FR] state.SkipWithMessage #963 (#1564) (Mike Apodaca)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/adb0d3d

...

Change-Id: I69218b84b88fb1da25e740d7fb623528d526b85b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4429376
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#87139}
2023-04-18 12:05:43 +00:00
Michael Lippautz 3eae9d57ef cppgc: Initialize benchmark process only once
Otherwise, DCHECKs complain that the PageAllocator used for the
GlobalGCInfoTable may differ when setting up the platform repeatedly
through benchmarking SetUp().

Change-Id: I7e87e8c9d8c283105e1bd75a4cd176df7f304315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283075
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77920}
2021-11-16 13:15:44 +00:00
Michael Lippautz 707c5a0b38 cppgc: Fix empty benchmark on Windows
Keep idiomatic state loop but rely on USE() to avoid
warning about unused variables.

Bug: v8:11687
Change-Id: Icde295723c5d389d827280f70a65776866d4e7a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2850645
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74200}
2021-04-27 07:52:52 +00:00
Michael Lippautz a2cf158ad4 cppgc-js: Report C++ memory to V8's heap growing
Add reporting of C++ memory to V8's heap growing strategy via
existing EmbedderHeapTracer interface.

In addition, introduce API-level NoGarbageCollectionScope which
allows to temporarily avoid scheduling GC finalizations. Replace
internal NoGCScope with NoGarbageCollectionScope and remove
NoGCScope.

Bug: chromium:1056170
Change-Id: I0ad3dfd67eb81f09f48e2ab87f9bbece7491ed71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650210
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72345}
2021-01-27 00:32:05 +00:00
Michael Lippautz 66fc94313b cppgc: Add allocation benchmark
Output:

$ out/x64.release/cppgc_allocation_benchmark --benchmark_repetitions=3

Running out/x64.release/cppgc_allocation_benchmark
Run on (56 X 3500 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x28)
  L1 Instruction 32 KiB (x28)
  L2 Unified 256 KiB (x28)
  L3 Unified 35840 KiB (x2)
Load Average: 0.23, 0.27, 0.27
--------------------------------------------------------------------------------
Benchmark                      Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------
Allocate/Tiny               17.0 ns         17.0 ns     40348381 bytes_per_second=55.9692M/s
Allocate/Tiny               17.1 ns         17.1 ns     40348381 bytes_per_second=55.8961M/s
Allocate/Tiny               17.2 ns         17.2 ns     40348381 bytes_per_second=55.3108M/s
Allocate/Tiny_mean          17.1 ns         17.1 ns            3 bytes_per_second=55.7254M/s
Allocate/Tiny_median        17.1 ns         17.1 ns            3 bytes_per_second=55.8961M/s
Allocate/Tiny_stddev       0.112 ns        0.111 ns            3 bytes_per_second=369.571k/s
Allocate/Large             40339 ns        40334 ns        17707 bytes_per_second=1.51326G/s
Allocate/Large             40350 ns        40343 ns        17707 bytes_per_second=1.51292G/s
Allocate/Large             40205 ns        40192 ns        17707 bytes_per_second=1.51861G/s
Allocate/Large_mean        40298 ns        40290 ns            3 bytes_per_second=1.51493G/s
Allocate/Large_median      40339 ns        40334 ns            3 bytes_per_second=1.51326G/s
Allocate/Large_stddev       81.2 ns         84.7 ns            3 bytes_per_second=3.26614M/s

2020-07-03T09: 14:23+02:00
Change-Id: I25a55beb5ea1718af76e638b752bf7d67cfe373e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280086
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68672}
2020-07-03 11:58:21 +00:00