projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ust: improve message parsing
[ust.git]
/
libtracing
/
channels.c
diff --git
a/libtracing/channels.c
b/libtracing/channels.c
index 1a23afef473c352e6ea61271c929fad7e599584a..a8df3c48ad916a03661d786e6860491dec68aca0 100644
(file)
--- a/
libtracing/channels.c
+++ b/
libtracing/channels.c
@@
-16,6
+16,7
@@
#include "kernelcompat.h"
#include "channels.h"
#include "kernelcompat.h"
#include "channels.h"
+#include "usterr.h"
/*
* ltt_channel_mutex may be nested inside the LTT trace mutex.
/*
* ltt_channel_mutex may be nested inside the LTT trace mutex.
@@
-239,8
+240,10
@@
struct ltt_channel_struct *ltt_channels_trace_alloc(unsigned int *nr_channels,
struct ltt_channel_setting *iter;
mutex_lock(<t_channel_mutex);
struct ltt_channel_setting *iter;
mutex_lock(<t_channel_mutex);
- if (!free_index)
+ if (!free_index) {
+ WARN("ltt_channels_trace_alloc: no free_index; are there any probes connected?");
goto end;
goto end;
+ }
if (!atomic_read(&index_kref.refcount))
kref_init(&index_kref);
else
if (!atomic_read(&index_kref.refcount))
kref_init(&index_kref);
else
@@
-248,8
+251,10
@@
struct ltt_channel_struct *ltt_channels_trace_alloc(unsigned int *nr_channels,
*nr_channels = free_index;
channel = kzalloc(sizeof(struct ltt_channel_struct) * free_index,
GFP_KERNEL);
*nr_channels = free_index;
channel = kzalloc(sizeof(struct ltt_channel_struct) * free_index,
GFP_KERNEL);
- if (!channel)
+ if (!channel) {
+ WARN("ltt_channel_struct: channel null after alloc");
goto end;
goto end;
+ }
list_for_each_entry(iter, <t_channels, list) {
if (!atomic_read(&iter->kref.refcount))
continue;
list_for_each_entry(iter, <t_channels, list) {
if (!atomic_read(&iter->kref.refcount))
continue;
@@
-306,6
+311,8
@@
int _ltt_channels_get_event_id(const char *channel, const char *name)
ret = 0;
else if (strcmp(name, "core_marker_format") == 0)
ret = 1;
ret = 0;
else if (strcmp(name, "core_marker_format") == 0)
ret = 1;
+ else if (strcmp(name, "testev") == 0)
+ ret = 2;
else
ret = -ENOENT;
goto end;
else
ret = -ENOENT;
goto end;
This page took
0.023426 seconds
and
4
git commands to generate.