0
Commit Graph

9 Commits

Author SHA1 Message Date
Anthony Vallée-Dubois
e3c94919c5 Make database tag mandatory
This CL removes the default value of the `tag` argument on the 2
`sql::Database` constructors, and updates all callers that didn't
explicitly pass a tag to do so.

As a convenience, this CL also defines a common tag for unit tests.

This will allow the implementation and monitoring of per-database
performance metrics (time to open, statement execution time, VMSteps,
etc) without the possibility of having some of the databases
uninstrumented. This is useful for diagnosing issues such as crbug.com/369635654 in the wild, and required for some performance investigations that we have in the pipeline.

The last step of this work item (asserting that the tag is correctly defined in histograms.xml variants) is implemented in https://chromium-review.googlesource.com/c/chromium/src/+/6055279.

Bug: 40949392
Change-Id: I6dec0fb86a5e7b98cd42ac3a9db18e23eaf9e9bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039025
Reviewed-by: manuk hovanesian <manukh@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1395446}
2024-12-12 08:47:47 -08:00
Ho Cheung
adbf3fb72a [base] [trace_event] Rename Macro-like enum values in base/trace_event
Many macro-like enum values are defined in //base/trace_event/,
for example, `enum class MemoryDumpDeterminism : uint32_t { NONE,
FORCE_GC }`.

Google C++ style guide recommends today to not name macro-like enum
values.

This patch only renames some Macro-like enum values, and the remaining
Macro-like enum values will be renamed in subsequent patches.

Bug: 1453482
Change-Id: I0d103a0d258ef4c60876c1f8bc8e4d9685792744
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4841679
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ho Cheung <uioptt24@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1193888}
2023-09-08 02:01:11 +00:00
Avi Drissman
69b874fee0 Update copyright headers in sql/, storage/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
Bug: 1098010
Change-Id: I68bb81a4dcae37f944f4d8cd39d82ed540364615
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3899461
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047607}
2022-09-15 19:11:14 +00:00
Victor Costan
49a903ab69 Reland "sql: Remove SQLTestBase."
This is a reland of 525b30ab9b

This reland removes the call to GetDBOptions() from the DatabaseTest
constructor, which was flagged as undefined behavior by the ubsan-vptr
bot. sql::Database construction is deferred to the SetUp() method by
turning the test's sql::Database member into a
std::unique_ptr<sql::Database>.

Original change's description:
> sql: Remove SQLTestBase.
>
> Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Commit-Queue: Ayu Ishii <ayui@chromium.org>
> Reviewed-by: Ayu Ishii <ayui@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#879443}

Change-Id: Ie83bf28eaebb88883b9eb37a7d8407e8bfc619ad
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878638
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880595}
2021-05-07 22:21:00 +00:00
John Abd-El-Malek
b6424076ec Revert "sql: Remove SQLTestBase."
This reverts commit 525b30ab9b.

Reason for revert: broke https://ci.chromium.org/p/chromium/builders/ci/linux-ubsan-vptr/4041

Original change's description:
> sql: Remove SQLTestBase.
>
> Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
> Auto-Submit: Victor Costan <pwnall@chromium.org>
> Commit-Queue: Ayu Ishii <ayui@chromium.org>
> Reviewed-by: Ayu Ishii <ayui@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#879443}

Change-Id: Ifee1fc660698bf511bd347f3e8f87a2e90083576
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2874780
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879554}
2021-05-05 21:26:00 +00:00
Victor Costan
525b30ab9b sql: Remove SQLTestBase.
Change-Id: I87bf9499ef590b006660d3b8ab305b0192ec405c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2866306
Auto-Submit: Victor Costan <pwnall@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#879443}
2021-05-05 17:54:10 +00:00
erikchen
f62ea04b8e Remove dead code for legacy heap profiler.
This CL is a refactor with no intended behavior change.

This CL:
  * Removes the mojom interface ClientProcesss::EnableHeapProfiling.
  * Removes the implementation, primarily hosted in MemoryDumpManager.

Change-Id: Id55835da60d86520f692385930208a31206f7dce
Bug: 822843
TBR: sky@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1069000
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562017}
2018-05-25 21:30:57 +00:00
ssid
448e5edbda [tracing] Sanitize process memory dump names for background mode
For background mode:
1. ProcessMemoryDump knows the level of detail.
2. It checks for dump name to be present in whitelist. If not then
   returns a dummy mad. The strings are stripped of numbers (ids) and
   checked against a whitelist of dump names.
3. Disable creating new dumps just to mark suballocations.
4. Disable creation of global allocator dumps.
5. Disable string attributes in allocator dumps.
Also creates a new whitelist file to handle whitelisting logic.

BUG=613198
TBR=shess@chromium.org, jochen@chromium.org

Review-Url: https://codereview.chromium.org/2006943003
Cr-Commit-Position: refs/heads/master@{#397918}
2016-06-04 12:42:21 +00:00
ssid
9f8022f2aa [tracing] Add sqlite memory statistics to tracing.
The process-wide memory usage statistics of sqlite library is added to
chrome://tracing. The memory usage of sqlite library is mainly through
sqlite_malloc. The total usage of the process is recorded by
sqlite3_memory_used() api. This CL also adds per-connection memory
usage to tracing. Each connection uses memory for cache, schema and
statement, and these usages are recorded. sqlit3_malloc uses malloc
internally to allocate memory. So, thie memory is traced as
sub-allocation from system_allocator(malloc).
This CL lets us keep track of sqlite memory usage in chrome telemetry.

BUG=466141

Review URL: https://codereview.chromium.org/1327063002

Cr-Commit-Position: refs/heads/master@{#353549}
2015-10-12 17:49:46 +00:00