Debian Codegraph @

src/libsysprof/sysprof-document-traceable.h

raw
1 /*
2 * sysprof-document-traceable.h
3 *
4 * Copyright 2023 Christian Hergert <[email protected]>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program 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
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * SPDX-License-Identifier: GPL-3.0-or-later
20 */
21
22 #pragma once
23
24 #include "sysprof-document-frame.h"
25
26 G_BEGIN_DECLS
27
28 #define SYSPROF_TYPE_DOCUMENT_TRACEABLE (sysprof_document_traceable_get_type ())
29
30 SYSPROF_AVAILABLE_IN_ALL
31 G_DECLARE_INTERFACE (SysprofDocumentTraceable, sysprof_document_traceable, SYSPROF, DOCUMENT_TRACEABLE, SysprofDocumentFrame)
32
33 struct _SysprofDocumentTraceableInterface
34 {
35 GTypeInterface parent;
36
37 guint (*get_stack_depth) (SysprofDocumentTraceable *self);
38 guint64 (*get_stack_address) (SysprofDocumentTraceable *self,
39 guint position);
40 guint (*get_stack_addresses) (SysprofDocumentTraceable *self,
41 guint64 *addresses,
42 guint n_addresses);
43 int (*get_thread_id) (SysprofDocumentTraceable *self);
44 };
45
46 SYSPROF_AVAILABLE_IN_ALL
47 guint sysprof_document_traceable_get_stack_depth (SysprofDocumentTraceable *self);
48 SYSPROF_AVAILABLE_IN_ALL
49 guint64 sysprof_document_traceable_get_stack_address (SysprofDocumentTraceable *self,
50 guint position);
51 SYSPROF_AVAILABLE_IN_ALL
52 guint sysprof_document_traceable_get_stack_addresses (SysprofDocumentTraceable *self,
53 guint64 *addresses,
54 guint n_addresses);
55 SYSPROF_AVAILABLE_IN_ALL
56 int sysprof_document_traceable_get_thread_id (SysprofDocumentTraceable *self);
57
58 G_END_DECLS