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 0 : void callgrindStart()
22 : {
23 : CALLGRIND_ZERO_STATS;
24 : CALLGRIND_START_INSTRUMENTATION;
25 0 : };
26 :
27 0 : void callgrindDump(const char* name)
28 : {
29 : CALLGRIND_STOP_INSTRUMENTATION;
30 : CALLGRIND_DUMP_STATS_AT(name);
31 0 : };
32 :
33 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|