1 | /* Pango |
2 | * pango-trace.c: |
3 | * |
4 | * Copyright (C) 2020 Red Hat, Inc |
5 | * |
6 | * This library is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU Lesser General Public |
8 | * License as published by the Free Software Foundation; either |
9 | * version 2 of the License, or (at your option) any later version. |
10 | * |
11 | * This library is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | * Library General Public License for more details. |
15 | * |
16 | * You should have received a copy of the GNU Lesser General Public |
17 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
18 | */ |
19 | |
20 | #include "config.h" |
21 | |
22 | #include "pango-trace-private.h" |
23 | |
24 | #include <stdarg.h> |
25 | |
26 | void |
27 | (pango_trace_mark) (gint64 begin_time, |
28 | const gchar *name, |
29 | const gchar *message_format, |
30 | ...) |
31 | { |
32 | #ifdef HAVE_SYSPROF |
33 | gint64 end_time = PANGO_TRACE_CURRENT_TIME; |
34 | va_list args; |
35 | |
36 | va_start (args, message_format); |
37 | sysprof_collector_mark_vprintf (begin_time, end_time - begin_time, "Pango" , name, message_format, args); |
38 | va_end (args); |
39 | #endif /* HAVE_SYSPROF */ |
40 | } |
41 | |