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

Side by Side Diff: base/trace_event/trace_log.h

Issue 2316403002: Fix races in trace events filtering. (Closed)
Patch Set: Clear filters on SetEnabled. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_
6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 ProcessMemoryDump* pmd) override; 396 ProcessMemoryDump* pmd) override;
397 397
398 // Enable/disable each category group based on the current mode_, 398 // Enable/disable each category group based on the current mode_,
399 // category_filter_, event_callback_ and event_callback_category_filter_. 399 // category_filter_, event_callback_ and event_callback_category_filter_.
400 // Enable the category group in the enabled mode if category_filter_ matches 400 // Enable the category group in the enabled mode if category_filter_ matches
401 // the category group, or event_callback_ is not null and 401 // the category group, or event_callback_ is not null and
402 // event_callback_category_filter_ matches the category group. 402 // event_callback_category_filter_ matches the category group.
403 void UpdateCategoryGroupEnabledFlags(); 403 void UpdateCategoryGroupEnabledFlags();
404 void UpdateCategoryGroupEnabledFlag(size_t category_index); 404 void UpdateCategoryGroupEnabledFlag(size_t category_index);
405 405
406 void CreateFiltersForTraceConfig();
407
406 // Configure synthetic delays based on the values set in the current 408 // Configure synthetic delays based on the values set in the current
407 // trace config. 409 // trace config.
408 void UpdateSyntheticDelaysFromTraceConfig(); 410 void UpdateSyntheticDelaysFromTraceConfig();
409 411
410 InternalTraceOptions GetInternalOptionsFromTraceConfig( 412 InternalTraceOptions GetInternalOptionsFromTraceConfig(
411 const TraceConfig& config); 413 const TraceConfig& config);
412 414
413 class ThreadLocalEventBuffer; 415 class ThreadLocalEventBuffer;
414 class OptionalAutoLock; 416 class OptionalAutoLock;
415 struct RegisteredAsyncObserver; 417 struct RegisteredAsyncObserver;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 subtle::AtomicWord generation_; 549 subtle::AtomicWord generation_;
548 bool use_worker_thread_; 550 bool use_worker_thread_;
549 551
550 DISALLOW_COPY_AND_ASSIGN(TraceLog); 552 DISALLOW_COPY_AND_ASSIGN(TraceLog);
551 }; 553 };
552 554
553 } // namespace trace_event 555 } // namespace trace_event
554 } // namespace base 556 } // namespace base
555 557
556 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ 558 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698