tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

heap_profiler_allocation_context_tracker.h (1448B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 // This is a dummy version of Chromium source file base/trace_event/heap_profiler_allocation_context_tracker.h.
      8 // To provide a function required in base/threading/thread_id_name_manager.cc
      9 // SetCurrentThreadName. We don't use the heap profiler.
     10 
     11 #ifndef BASE_TRACE_EVENT_HEAP_PROFILER_ALLOCATION_CONTEXT_TRACKER_H_
     12 #define BASE_TRACE_EVENT_HEAP_PROFILER_ALLOCATION_CONTEXT_TRACKER_H_
     13 
     14 namespace base {
     15 namespace trace_event {
     16 
     17 // The allocation context tracker keeps track of thread-local context for heap
     18 // profiling. It includes a pseudo stack of trace events. On every allocation
     19 // the tracker provides a snapshot of its context in the form of an
     20 // |AllocationContext| that is to be stored together with the allocation
     21 // details.
     22 class BASE_EXPORT AllocationContextTracker {
     23 public:
     24  static void SetCurrentThreadName(const char* name) {}
     25 
     26  AllocationContextTracker(const AllocationContextTracker&) = delete;
     27  AllocationContextTracker& operator=(const AllocationContextTracker&) = delete;
     28 };
     29 
     30 }  // namespace trace_event
     31 }  // namespace base
     32 
     33 #endif  // BASE_TRACE_EVENT_HEAP_PROFILER_ALLOCATION_CONTEXT_TRACKER_H_