[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / scudo / standalone / timing.cpp
blob59ae21d10f0f6e89dc1afb92f7d3b4782b4939df
1 //===-- timing.cpp ----------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "timing.h"
11 namespace scudo {
13 Timer::~Timer() {
14 if (Manager)
15 Manager->report(*this);
18 ScopedTimer::ScopedTimer(TimingManager &Manager, const char *Name)
19 : Timer(Manager.getOrCreateTimer(Name)) {
20 start();
23 ScopedTimer::ScopedTimer(TimingManager &Manager, const Timer &Nest,
24 const char *Name)
25 : Timer(Manager.nest(Nest, Name)) {
26 start();
29 } // namespace scudo