projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: filter interpreter: use LTTNG_SIZE_MAX
[lttng-modules.git]
/
lttng-events.c
diff --git
a/lttng-events.c
b/lttng-events.c
index 21c41133b859623e6a5ea63c65927021cb646171..ec44502318d8ec132eb3835e8bdc828112010724 100644
(file)
--- a/
lttng-events.c
+++ b/
lttng-events.c
@@
-186,7
+186,7
@@
void lttng_session_destroy(struct lttng_session *session)
int ret;
mutex_lock(&sessions_mutex);
int ret;
mutex_lock(&sessions_mutex);
-
ACCESS_ONCE(session->active) = 0
;
+
WRITE_ONCE(session->active, 0)
;
list_for_each_entry(chan, &session->chan, list) {
ret = lttng_syscalls_unregister(chan);
WARN_ON(ret);
list_for_each_entry(chan, &session->chan, list) {
ret = lttng_syscalls_unregister(chan);
WARN_ON(ret);
@@
-261,16
+261,16
@@
int lttng_session_enable(struct lttng_session *session)
lib_ring_buffer_clear_quiescent_channel(chan->chan);
}
lib_ring_buffer_clear_quiescent_channel(chan->chan);
}
-
ACCESS_ONCE(session->active) = 1
;
-
ACCESS_ONCE(session->been_active) = 1
;
+
WRITE_ONCE(session->active, 1)
;
+
WRITE_ONCE(session->been_active, 1)
;
ret = _lttng_session_metadata_statedump(session);
if (ret) {
ret = _lttng_session_metadata_statedump(session);
if (ret) {
-
ACCESS_ONCE(session->active) = 0
;
+
WRITE_ONCE(session->active, 0)
;
goto end;
}
ret = lttng_statedump_start(session);
if (ret)
goto end;
}
ret = lttng_statedump_start(session);
if (ret)
-
ACCESS_ONCE(session->active) = 0
;
+
WRITE_ONCE(session->active, 0)
;
end:
mutex_unlock(&sessions_mutex);
return ret;
end:
mutex_unlock(&sessions_mutex);
return ret;
@@
-286,7
+286,7
@@
int lttng_session_disable(struct lttng_session *session)
ret = -EBUSY;
goto end;
}
ret = -EBUSY;
goto end;
}
-
ACCESS_ONCE(session->active) = 0
;
+
WRITE_ONCE(session->active, 0)
;
/* Set transient enabler state to "disabled" */
session->tstate = 0;
/* Set transient enabler state to "disabled" */
session->tstate = 0;
@@
-342,8
+342,6
@@
end:
return ret;
}
return ret;
}
-
-
int lttng_channel_enable(struct lttng_channel *channel)
{
int ret = 0;
int lttng_channel_enable(struct lttng_channel *channel)
{
int ret = 0;
@@
-361,7
+359,7
@@
int lttng_channel_enable(struct lttng_channel *channel)
channel->tstate = 1;
lttng_session_sync_enablers(channel->session);
/* Set atomically the state to "enabled" */
channel->tstate = 1;
lttng_session_sync_enablers(channel->session);
/* Set atomically the state to "enabled" */
-
ACCESS_ONCE(channel->enabled) = 1
;
+
WRITE_ONCE(channel->enabled, 1)
;
end:
mutex_unlock(&sessions_mutex);
return ret;
end:
mutex_unlock(&sessions_mutex);
return ret;
@@
-381,7
+379,7
@@
int lttng_channel_disable(struct lttng_channel *channel)
goto end;
}
/* Set atomically the state to "disabled" */
goto end;
}
/* Set atomically the state to "disabled" */
-
ACCESS_ONCE(channel->enabled) = 0
;
+
WRITE_ONCE(channel->enabled, 0)
;
/* Set transient enabler state to "enabled" */
channel->tstate = 0;
lttng_session_sync_enablers(channel->session);
/* Set transient enabler state to "enabled" */
channel->tstate = 0;
lttng_session_sync_enablers(channel->session);
@@
-411,7
+409,7
@@
int lttng_event_enable(struct lttng_event *event)
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_FUNCTION:
case LTTNG_KERNEL_NOOP:
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_FUNCTION:
case LTTNG_KERNEL_NOOP:
-
ACCESS_ONCE(event->enabled) = 1
;
+
WRITE_ONCE(event->enabled, 1)
;
break;
case LTTNG_KERNEL_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 1);
break;
case LTTNG_KERNEL_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 1);
@@
-446,7
+444,7
@@
int lttng_event_disable(struct lttng_event *event)
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_FUNCTION:
case LTTNG_KERNEL_NOOP:
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_FUNCTION:
case LTTNG_KERNEL_NOOP:
-
ACCESS_ONCE(event->enabled) = 0
;
+
WRITE_ONCE(event->enabled, 0)
;
break;
case LTTNG_KERNEL_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 0);
break;
case LTTNG_KERNEL_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 0);
@@
-1517,7
+1515,7
@@
void lttng_session_sync_enablers(struct lttng_session *session)
*/
enabled = enabled && session->tstate && event->chan->tstate;
*/
enabled = enabled && session->tstate && event->chan->tstate;
-
ACCESS_ONCE(event->enabled) = enabled
;
+
WRITE_ONCE(event->enabled, enabled)
;
/*
* Sync tracepoint registration with event enabled
* state.
/*
* Sync tracepoint registration with event enabled
* state.
@@
-1643,7
+1641,7
@@
int lttng_metadata_printf(struct lttng_session *session,
va_list ap;
struct lttng_metadata_stream *stream;
va_list ap;
struct lttng_metadata_stream *stream;
- WARN_ON_ONCE(!
ACCESS
_ONCE(session->active));
+ WARN_ON_ONCE(!
READ
_ONCE(session->active));
va_start(ap, fmt);
str = kvasprintf(GFP_KERNEL, fmt, ap);
va_start(ap, fmt);
str = kvasprintf(GFP_KERNEL, fmt, ap);
@@
-2050,6
+2048,7
@@
int _lttng_field_statedump(struct lttng_session *session,
ret = _lttng_enum_statedump(session, field, nesting);
break;
case atype_array:
ret = _lttng_enum_statedump(session, field, nesting);
break;
case atype_array:
+ case atype_array_bitfield:
{
const struct lttng_basic_type *elem_type;
{
const struct lttng_basic_type *elem_type;
@@
-2088,6
+2087,7
@@
int _lttng_field_statedump(struct lttng_session *session,
break;
}
case atype_sequence:
break;
}
case atype_sequence:
+ case atype_sequence_bitfield:
{
const struct lttng_basic_type *elem_type;
const struct lttng_basic_type *length_type;
{
const struct lttng_basic_type *elem_type;
const struct lttng_basic_type *length_type;
@@
-2230,7
+2230,7
@@
int _lttng_event_metadata_statedump(struct lttng_session *session,
{
int ret = 0;
{
int ret = 0;
- if (event->metadata_dumped || !
ACCESS
_ONCE(session->active))
+ if (event->metadata_dumped || !
READ
_ONCE(session->active))
return 0;
if (chan->channel_type == METADATA_CHANNEL)
return 0;
return 0;
if (chan->channel_type == METADATA_CHANNEL)
return 0;
@@
-2297,7
+2297,7
@@
int _lttng_channel_metadata_statedump(struct lttng_session *session,
{
int ret = 0;
{
int ret = 0;
- if (chan->metadata_dumped || !
ACCESS
_ONCE(session->active))
+ if (chan->metadata_dumped || !
READ
_ONCE(session->active))
return 0;
if (chan->channel_type == METADATA_CHANNEL)
return 0;
if (chan->channel_type == METADATA_CHANNEL)
@@
-2454,7
+2454,7
@@
int _lttng_session_metadata_statedump(struct lttng_session *session)
struct lttng_event *event;
int ret = 0;
struct lttng_event *event;
int ret = 0;
- if (!
ACCESS
_ONCE(session->active))
+ if (!
READ
_ONCE(session->active))
return 0;
if (session->metadata_dumped)
goto skip_session;
return 0;
if (session->metadata_dumped)
goto skip_session;
@@
-2646,7
+2646,7
@@
void lttng_transport_unregister(struct lttng_transport *transport)
}
EXPORT_SYMBOL_GPL(lttng_transport_unregister);
}
EXPORT_SYMBOL_GPL(lttng_transport_unregister);
-#if (
defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
))
+#if (
LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0
))
enum cpuhp_state lttng_hp_prepare;
enum cpuhp_state lttng_hp_online;
enum cpuhp_state lttng_hp_prepare;
enum cpuhp_state lttng_hp_online;
@@
-2762,7
+2762,7
@@
static void __exit lttng_exit_cpu_hotplug(void)
cpuhp_remove_multi_state(lttng_hp_prepare);
}
cpuhp_remove_multi_state(lttng_hp_prepare);
}
-#else /* #if (
CONFIG_HOTPLUG_CPU && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
)) */
+#else /* #if (
LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0
)) */
static int lttng_init_cpu_hotplug(void)
{
return 0;
static int lttng_init_cpu_hotplug(void)
{
return 0;
@@
-2770,7
+2770,7
@@
static int lttng_init_cpu_hotplug(void)
static void lttng_exit_cpu_hotplug(void)
{
}
static void lttng_exit_cpu_hotplug(void)
{
}
-#endif /* #else #if (
CONFIG_HOTPLUG_CPU && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
)) */
+#endif /* #else #if (
LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0
)) */
static int __init lttng_events_init(void)
static int __init lttng_events_init(void)
This page took
0.026795 seconds
and
4
git commands to generate.