Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #include <test/callgrind.hxx>
11 :
12 : #ifdef HAVE_VALGRIND_HEADERS
13 : #include <valgrind/callgrind.h>
14 : #else
15 : #define CALLGRIND_START_INSTRUMENTATION
16 : #define CALLGRIND_ZERO_STATS
17 : #define CALLGRIND_STOP_INSTRUMENTATION
18 : #define CALLGRIND_DUMP_STATS_AT(name) (void)name;
19 : #endif
20 :
21 2 : void callgrindStart()
22 : {
23 2 : CALLGRIND_ZERO_STATS;
24 2 : CALLGRIND_START_INSTRUMENTATION;
25 2 : };
26 :
27 2 : void callgrindDump(const char* name)
28 : {
29 2 : CALLGRIND_STOP_INSTRUMENTATION;
30 2 : CALLGRIND_DUMP_STATS_AT(name);
31 2 : };
32 :
33 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|