satyr  0.26
java/thread.h
Go to the documentation of this file.
1 /*
2  java_thread.h
3 
4  Copyright (C) 2012 ABRT Team
5  Copyright (C) 2012 Red Hat, Inc.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21 #ifndef SATYR_JAVA_THREAD_H
22 #define SATYR_JAVA_THREAD_H
23 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include "../report_type.h"
34 #include <stdbool.h>
35 #include <stdint.h>
36 
37 struct sr_java_frame;
38 struct sr_strbuf;
39 struct sr_location;
40 struct sr_json_value;
41 
48 {
49  enum sr_report_type type;
50 
54  char *name;
55 
60 
66 };
67 
74 struct sr_java_thread *
75 sr_java_thread_new(void);
76 
83 void
84 sr_java_thread_init(struct sr_java_thread *thread);
85 
92 void
93 sr_java_thread_free(struct sr_java_thread *thread);
94 
105 struct sr_java_thread *
106 sr_java_thread_dup(struct sr_java_thread *thread,
107  bool siblings);
108 
117 int
118 sr_java_thread_cmp(struct sr_java_thread *thread1,
119  struct sr_java_thread *thread2);
120 
126 struct sr_java_thread *
128  struct sr_java_thread *item);
129 
139 void
141  int *ok_count,
142  int *all_count);
143 
156 float
157 sr_java_thread_quality(struct sr_java_thread *thread);
158 
165 bool
167  struct sr_java_frame *frame);
168 
177 bool
179  struct sr_java_frame *frame);
180 
184 void
186  int n);
187 
191 void
193  struct sr_strbuf *dest);
194 
210 struct sr_java_thread *
211 sr_java_thread_parse(const char **input,
212  struct sr_location *location);
213 
222 char *
224 
225 char *
226 sr_java_thread_to_json(struct sr_java_thread *thread);
227 
237 struct sr_java_thread *
238 sr_java_thread_from_json(struct sr_json_value *root, char **error_message);
239 
240 #ifdef __cplusplus
241 }
242 #endif
243 
244 #endif
void sr_java_thread_init(struct sr_java_thread *thread)
struct sr_java_thread * sr_java_thread_new(void)
A thread of execution of a JAVA-produced stack trace.
Definition: java/thread.h:47
struct sr_java_thread * sr_java_thread_from_json(struct sr_json_value *root, char **error_message)
struct sr_java_thread * sr_java_thread_append(struct sr_java_thread *dest, struct sr_java_thread *item)
char * sr_java_thread_format_funs(struct sr_java_thread *thread)
struct sr_java_thread * next
Definition: java/thread.h:65
A resizable string buffer.
Definition: strbuf.h:38
struct sr_java_thread * sr_java_thread_parse(const char **input, struct sr_location *location)
struct sr_java_thread * sr_java_thread_dup(struct sr_java_thread *thread, bool siblings)
void sr_java_thread_append_to_str(struct sr_java_thread *thread, struct sr_strbuf *dest)
float sr_java_thread_quality(struct sr_java_thread *thread)
void sr_java_thread_remove_frames_below_n(struct sr_java_thread *thread, int n)
bool sr_java_thread_remove_frame(struct sr_java_thread *thread, struct sr_java_frame *frame)
struct sr_java_frame * frames
Definition: java/thread.h:59
A location of a parser in the input stream.
Definition: location.h:42
void sr_java_thread_free(struct sr_java_thread *thread)
void sr_java_thread_quality_counts(struct sr_java_thread *thread, int *ok_count, int *all_count)
int sr_java_thread_cmp(struct sr_java_thread *thread1, struct sr_java_thread *thread2)
bool sr_java_thread_remove_frames_above(struct sr_java_thread *thread, struct sr_java_frame *frame)