Skip to content
Snippets Groups Projects
Select Git revision
  • 18c012d922620bb35ff2ab6838f1269bc12cf647
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

iavf_virtchnl.c

Blame
  • builtin-trace.c 74.25 KiB
    #include <traceevent/event-parse.h>
    #include "builtin.h"
    #include "util/color.h"
    #include "util/debug.h"
    #include "util/evlist.h"
    #include "util/machine.h"
    #include "util/session.h"
    #include "util/thread.h"
    #include "util/parse-options.h"
    #include "util/strlist.h"
    #include "util/intlist.h"
    #include "util/thread_map.h"
    #include "util/stat.h"
    #include "trace-event.h"
    #include "util/parse-events.h"
    
    #include <libaudit.h>
    #include <stdlib.h>
    #include <sys/eventfd.h>
    #include <sys/mman.h>
    #include <linux/futex.h>
    
    /* For older distros: */
    #ifndef MAP_STACK
    # define MAP_STACK		0x20000
    #endif
    
    #ifndef MADV_HWPOISON
    # define MADV_HWPOISON		100
    #endif
    
    #ifndef MADV_MERGEABLE
    # define MADV_MERGEABLE		12
    #endif
    
    #ifndef MADV_UNMERGEABLE
    # define MADV_UNMERGEABLE	13
    #endif
    
    #ifndef EFD_SEMAPHORE
    # define EFD_SEMAPHORE		1
    #endif
    
    struct tp_field {
    	int offset;
    	union {
    		u64 (*integer)(struct tp_field *field, struct perf_sample *sample);
    		void *(*pointer)(struct tp_field *field, struct perf_sample *sample);
    	};
    };
    
    #define TP_UINT_FIELD(bits) \
    static u64 tp_field__u##bits(struct tp_field *field, struct perf_sample *sample) \
    { \
    	u##bits value; \
    	memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
    	return value;  \
    }
    
    TP_UINT_FIELD(8);
    TP_UINT_FIELD(16);
    TP_UINT_FIELD(32);
    TP_UINT_FIELD(64);
    
    #define TP_UINT_FIELD__SWAPPED(bits) \
    static u64 tp_field__swapped_u##bits(struct tp_field *field, struct perf_sample *sample) \
    { \
    	u##bits value; \
    	memcpy(&value, sample->raw_data + field->offset, sizeof(value)); \
    	return bswap_##bits(value);\