Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Issue 2259493003: [tracing] Add trace events filtering predicate for heap profiler (Closed)

Created:
4 years, 4 months ago by ssid
Modified:
4 years, 4 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@heap_prof_filter
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Add trace events filtering predicate for heap profiler The heap profiler gets context for each allocation only from trace events whose category is enabled for recording. This CL changes: 1. The AddTraceEvent was called only for trace events with categories that are enabled for recording modes, but now it gets called for all categories including ones specified in filters. 2. Trace events are not added to traces if the category is enabled for filtering but not enabled for recording, irrespective of the filter result. 3. Add new filter "heap_profiler_predicate" that tracks trace events and adds to heap profiler pseudo stack. This filter returns true only for the events enabled for recording mode (only the recording mode is affected by filters, not etw and event callback modes). 4. When "memory-infra" is enabled with heap profiler flag turned on, then the heap profiler filter is installed by default and filters all categories and adds to trace only if the category is enabled for recording. This ensures that the heap profiler filter always gets all trace events and they only get added to trace file if they are enabled for recording, or they are enabled by other filters. BUG=598426, 625170 Committed: https://crrev.com/f35fbb8a6b310e118dc2e04d29849f27613a4754 Cr-Commit-Position: refs/heads/master@{#414210}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Ignore filter if not recording. #

Total comments: 2

Patch Set 3 : base_export and MakeUnique #

Total comments: 8

Patch Set 4 : Primiano's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -42 lines) Patch
M base/trace_event/heap_profiler_allocation_context_tracker_unittest.cc View 1 3 chunks +11 lines, -2 lines 0 comments Download
M base/trace_event/trace_config.cc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M base/trace_event/trace_event.h View 1 chunk +2 lines, -1 line 0 comments Download
M base/trace_event/trace_event_unittest.cc View 1 3 chunks +36 lines, -3 lines 0 comments Download
M base/trace_event/trace_log.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 6 chunks +55 lines, -35 lines 0 comments Download
M base/trace_event/trace_log_constants.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 38 (31 generated)
ssid
ptal, thanks. https://codereview.chromium.org/2259493003/diff/80001/base/trace_event/trace_event.h File base/trace_event/trace_event.h (right): https://codereview.chromium.org/2259493003/diff/80001/base/trace_event/trace_event.h#newcode80 base/trace_event/trace_event.h:80: base::trace_event::TraceLog::ENABLED_FOR_FILTERING)) As far as I can see ...
4 years, 4 months ago (2016-08-18 18:03:12 UTC) #14
oystein (OOO til 10th of July)
trace_log bits lgtm w/ a nit, can't speak for the memory-infra-specific bits! https://codereview.chromium.org/2259493003/diff/120001/base/trace_event/trace_log.cc File base/trace_event/trace_log.cc ...
4 years, 4 months ago (2016-08-23 17:42:43 UTC) #17
Primiano Tucci (use gerrit)
Ok this tripped my mind for an hour, but I'm ultimately convinced that is correct. ...
4 years, 4 months ago (2016-08-24 10:33:47 UTC) #26
ssid
On 2016/08/24 10:33:47, Primiano Tucci wrote: > Ok this tripped my mind for an hour, ...
4 years, 4 months ago (2016-08-24 18:01:26 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2259493003/160001
4 years, 4 months ago (2016-08-24 22:15:16 UTC) #34
commit-bot: I haz the power
Committed patchset #4 (id:160001)
4 years, 4 months ago (2016-08-25 00:04:47 UTC) #36
commit-bot: I haz the power
4 years, 4 months ago (2016-08-25 00:07:42 UTC) #38
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f35fbb8a6b310e118dc2e04d29849f27613a4754
Cr-Commit-Position: refs/heads/master@{#414210}

Powered by Google App Engine
This is Rietveld 408576698