Debian Codegraph @

src/libsysprof/sysprof-document-private.h

raw
1 /* sysprof-document-private.h
2 *
3 * Copyright 2023 Christian Hergert <[email protected]>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: GPL-3.0-or-later
19 */
20
21 #pragma once
22
23 #include <eggbitset.h>
24
25 #include <libdex.h>
26
27 #include "sysprof-document.h"
28 #include "sysprof-symbolizer.h"
29 #include "sysprof-symbol.h"
30
31 G_BEGIN_DECLS
32
33 typedef struct _SysprofDocumentFramePointer
34 {
35 guint64 offset : 48;
36 guint64 length : 16;
37 } SysprofDocumentFramePointer;
38
39 typedef struct _SysprofDocumentTimedValue
40 {
41 gint64 time;
42 union {
43 gint64 v_int64;
44 double v_double;
45 guint8 v_raw[8];
46 };
47 } SysprofDocumentTimedValue;
48
49 typedef void (*ProgressFunc) (double fraction,
50 const char *message,
51 gpointer user_data);
52
53 void _sysprof_document_new_async (GMappedFile *mapped_file,
54 ProgressFunc progress,
55 gpointer progress_data,
56 GDestroyNotify progress_data_destroy,
57 GCancellable *cancellable,
58 GAsyncReadyCallback callback,
59 gpointer user_data);
60 SysprofDocument *_sysprof_document_new_finish (GAsyncResult *result,
61 GError **error);
62 void _sysprof_document_set_title (SysprofDocument *self,
63 const char *title);
64 void _sysprof_document_symbolize_async (SysprofDocument *self,
65 SysprofSymbolizer *symbolizer,
66 ProgressFunc progress_func,
67 gpointer progress_data,
68 GDestroyNotify progress_data_destroy,
69 GCancellable *cancellable,
70 GAsyncReadyCallback callback,
71 gpointer user_data);
72 gboolean _sysprof_document_symbolize_finish (SysprofDocument *self,
73 GAsyncResult *result,
74 GError **error);
75 gboolean _sysprof_document_is_native (SysprofDocument *self);
76 GRefString *_sysprof_document_ref_string (SysprofDocument *self,
77 const char *name);
78 EggBitset *_sysprof_document_traceables (SysprofDocument *self);
79 SysprofSymbol *_sysprof_document_process_symbol (SysprofDocument *self,
80 int pid,
81 gboolean want_shared);
82 SysprofSymbol *_sysprof_document_thread_symbol (SysprofDocument *self,
83 int pid,
84 int tid);
85 SysprofSymbol *_sysprof_document_kernel_symbol (SysprofDocument *self);
86 GArray *_sysprof_document_get_frames (SysprofDocument *self);
87 EggBitset *_sysprof_document_get_allocations (SysprofDocument *self);
88 DexFuture *_sysprof_document_serialize_symbols(SysprofDocument *self);
89
90 G_END_DECLS