#include <errno.h>
#include <stdint.h>
#include <stddef.h>
+#include <stdio.h>
#include <urcu/arch.h>
#include <urcu-bp.h>
#include <helper.h>
#include "tracepoint-internal.h"
-#include "ltt-tracer-core.h"
+#include "lttng-tracer-core.h"
#include "jhash.h"
#include "error.h"
* Tracepoint hash table, containing the active tracepoints.
* Protected by tracepoint mutex.
*/
-#define TRACEPOINT_HASH_BITS 6
+#define TRACEPOINT_HASH_BITS 12
#define TRACEPOINT_TABLE_SIZE (1 << TRACEPOINT_HASH_BITS)
static struct cds_hlist_head tracepoint_table[TRACEPOINT_TABLE_SIZE];
static void *
tracepoint_entry_add_probe(struct tracepoint_entry *entry,
- void *probe, void *data)
+ void (*probe)(void), void *data)
{
int nr_probes = 0;
struct tracepoint_probe *old, *new;
}
static void *
-tracepoint_entry_remove_probe(struct tracepoint_entry *entry, void *probe,
- void *data)
+tracepoint_entry_remove_probe(struct tracepoint_entry *entry,
+ void (*probe)(void), void *data)
{
int nr_probes = 0, nr_del = 0, i;
struct tracepoint_probe *old, *new;
}
static struct tracepoint_probe *
-tracepoint_add_probe(const char *name, void *probe, void *data,
+tracepoint_add_probe(const char *name, void (*probe)(void), void *data,
const char *signature)
{
struct tracepoint_entry *entry;
* The probe address must at least be aligned on the architecture pointer size.
* Called with the tracepoint mutex held.
*/
-int __tracepoint_probe_register(const char *name, void *probe, void *data,
- const char *signature)
+int __tracepoint_probe_register(const char *name, void (*probe)(void),
+ void *data, const char *signature)
{
void *old;
int ret = 0;
return ret;
}
-static void *tracepoint_remove_probe(const char *name, void *probe, void *data)
+static void *tracepoint_remove_probe(const char *name, void (*probe)(void),
+ void *data)
{
struct tracepoint_entry *entry;
void *old;
* @probe: probe function pointer
* @probe: probe data pointer
*/
-int __tracepoint_probe_unregister(const char *name, void *probe, void *data)
+int __tracepoint_probe_unregister(const char *name, void (*probe)(void),
+ void *data)
{
void *old;
int ret = 0;
*
* caller must call tracepoint_probe_update_all()
*/
-int tracepoint_probe_register_noupdate(const char *name, void *probe,
+int tracepoint_probe_register_noupdate(const char *name, void (*probe)(void),
void *data, const char *signature)
{
void *old;
* caller must call tracepoint_probe_update_all()
* Called with the tracepoint mutex held.
*/
-int tracepoint_probe_unregister_noupdate(const char *name, void *probe,
+int tracepoint_probe_unregister_noupdate(const char *name, void (*probe)(void),
void *data)
{
void *old;