plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | vdso_standalone_test_x86 | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/vDSO/vdso_standalone_test_x86.c | 2,853 | utf_8 | 6c110ce664ffe60823d60dac1252710b | /*
* vdso_test.c: Sample code to test parse_vdso.c on x86
*
* You can amuse yourself by compiling with:
* gcc -std=gnu99 -nostdlib
* -Os -fno-asynchronous-unwind-tables -flto -lgcc_s
* vdso_standalone_test_x86.c parse_vdso.c
* to generate a small binary. On x86_64, you can omit -lgcc_s
* if you want t... |
google | android | parse_vdso | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/vDSO/parse_vdso.c | 7,071 | utf_8 | bee092ab9eb8e00929ffa745755e271a | /*
* parse_vdso.c: Linux reference vDSO parser
* Written by Andrew Lutomirski, 2011-2014.
*
* This code is meant to be linked in to various programs that run on Linux.
* As such, it is available with as few restrictions as possible. This file
*
* The vDSO is a regular ELF DSO that the kernel maps into user spac... |
google | android | vdso_test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/vDSO/vdso_test.c | 1,266 | utf_8 | 3761bb0e1f3b132e745f7c0bb848a3d2 | /*
* vdso_test.c: Sample code to test parse_vdso.c
*
* Compile with:
* gcc -std=gnu99 vdso_test.c parse_vdso.c
*
* Tested on x86, 32-bit and 64-bit. It may work on other architectures, too.
*/
#include <stdint.h>
#include <elf.h>
#include <stdio.h>
#include <sys/auxv.h>
#include <sys/time.h>
extern void *vdso_s... |
google | android | getdelays | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/accounting/getdelays.c | 13,554 | utf_8 | 16a09b32490764198a026f6e671b8a10 | /* getdelays.c
*
* Utility to get per-pid and per-tgid delay accounting statistics
* Also illustrates usage of the taskstats interface
*
*
* Compile with
* gcc -I/usr/src/linux/include getdelays.c -o getdelays
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <poll.h>
#in... |
google | android | watchdog-simple | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/watchdog/src/watchdog-simple.c | 346 | utf_8 | edd680602165559eabe6e791f37230e6 | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(void)
{
int fd = open("/dev/watchdog", O_WRONLY);
int ret = 0;
if (fd == -1) {
perror("watchdog");
exit(EXIT_FAILURE);
}
while (1) {
ret = write(fd, "\0", 1);
if (ret != 1) {
ret = -1;
break;
}
sleep(10);
}
... |
google | android | watchdog-test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/Documentation/watchdog/src/watchdog-test.c | 2,247 | utf_8 | a621e7810cc8249e79fab937f01b6b1c | /*
* Watchdog Driver Test Program
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/watchdog.h>
int fd;
/*
* This function simply sends an IOCTL to the driver, which in turn ticks... |
google | android | lsiio | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/iio/lsiio.c | 3,904 | utf_8 | f42c0b323e1580b86eb9186c42f44e03 | /*
* Industrial I/O utilities - lsiio.c
*
*/
#include <string.h>
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/dir.h>
#include "iio_utils.h"
static enum verbosity {
VERBLEVEL_DEFAULT, /... |
google | android | generic_buffer | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/iio/generic_buffer.c | 11,404 | utf_8 | 24efecc968313716695ca26b11bf1e75 | /* Industrialio buffer test code.
*
*
* This program is primarily intended as an example application.
* Reads the current buffer setup from sysfs and starts a short capture
* from the specified device, pretty printing the result after appropriate
* conversion.
*
* Command line parameters
* generic_buffer -n <d... |
google | android | iio_utils | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/iio/iio_utils.c | 21,822 | utf_8 | 16a53beab1c99328606f0c4fbe5e76b0 | /* IIO - useful set of util functionality
*
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <dirent.h>
#include <errno.h>
#include <ctype.h>
#include "iio_utils.h"
const char *iio_dir = "/sys/bus/iio/devices/";
static char * const iio_direction[] = {
"in",
"out",
};
/**
*... |
google | android | iio_event_monitor | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/iio/iio_event_monitor.c | 8,174 | utf_8 | a1381b444f1537c4eefc3388f34229d6 | /* Industrialio event test code.
*
*
* This program is primarily intended as an example application.
* Reads the current buffer setup from sysfs and starts a short capture
* from the specified device, pretty printing the result after appropriate
* conversion.
*
* Usage:
* iio_event_monitor <device_name>
*/
#i... |
google | android | ffs-test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/ffs-test.c | 15,102 | utf_8 | 2d6440918596fa8981d39b22daf60fe7 | /*
* ffs-test.c -- user mode filesystem api for usb composite function
*
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h... |
google | android | testusb | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/testusb.c | 12,866 | utf_8 | c785f9bb5009851394b0ac3b7df8e4ae | /* $(CROSS_COMPILE)cc -Wall -Wextra -g -lpthread -o testusb testusb.c */
/*
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* This program issues ioctls to perform the tests implemented by the
* kernel driver. It can generate a variety of transfer patterns; you
* should make sure to test both regular stream... |
google | android | names | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/libsrc/names.c | 11,404 | utf_8 | c5715b61397269d278d171fc5607cbb8 | /*
* names.c -- USB name database manipulation routines
*
* - names_deinit() is added.
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include "name... |
google | android | usbip_host_driver | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/libsrc/usbip_host_driver.c | 6,126 | utf_8 | efcc046a9fc521d921bb0535e90ebe72 | /*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <libudev.h>
#include "usbip_common.h"
#include "usbip_host_driver.h"
#include "list.h"
#include "sysfs_utils.h"
#undef PROGNAME
#define PROGNAME "libusbip"
struct usbip_host_driver *host_driver;
struc... |
google | android | usbip_common | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/libsrc/usbip_common.c | 6,713 | utf_8 | fe00e31827989e5a4e0bacf04c98cba9 | /*
*/
#include <libudev.h>
#include "usbip_common.h"
#include "names.h"
#undef PROGNAME
#define PROGNAME "libusbip"
int usbip_use_syslog;
int usbip_use_stderr;
int usbip_use_debug;
extern struct udev *udev_context;
struct speed_string {
int num;
char *speed;
char *desc;
};
static const struct speed_string speed_st... |
google | android | vhci_driver | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/libsrc/vhci_driver.c | 8,554 | utf_8 | a572b33488f10f4aab55965f2ed12831 | /*
*/
#include "usbip_common.h"
#include "vhci_driver.h"
#include <limits.h>
#include <netdb.h>
#include <libudev.h>
#include "sysfs_utils.h"
#undef PROGNAME
#define PROGNAME "libusbip"
struct usbip_vhci_driver *vhci_driver;
struct udev *udev_context;
static struct usbip_imported_device *
imported_device_init(struct ... |
google | android | sysfs_utils | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/libsrc/sysfs_utils.c | 526 | utf_8 | f318a38a92dd5b02e78ce412af3b743a | #include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "sysfs_utils.h"
#include "usbip_common.h"
int write_sysfs_attribute(const char *attr_path, const char *new_value,
size_t len)
{
int fd;
int length;
fd = open(attr_path, O_WRONLY);
if (fd < 0) {
dbg("error opening a... |
google | android | utils | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/utils.c | 1,584 | utf_8 | 9d3d2ddc6e799b256a63d67e5fa3d33c | /*
*/
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "usbip_common.h"
#include "utils.h"
#include "sysfs_utils.h"
int modify_match_busid(char *busid, int add)
{
char attr_name[] = "match_busid";
char command[SYSFS_BUS_ID_SIZE + 4];
char match_busid_attr_path[SYSFS_PATH_MAX];
int rc;
snprintf(m... |
google | android | usbip_port | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_port.c | 1,319 | utf_8 | 640de6fffd9b0d10979d6823967a3f11 | /*
*/
#include "vhci_driver.h"
#include "usbip_common.h"
static int list_imported_devices(void)
{
int i;
struct usbip_imported_device *idev;
int ret;
ret = usbip_vhci_driver_open();
if (ret < 0) {
err("open vhci_driver");
return -1;
}
printf("Imported USB devices\n");
printf("====================\n");
for... |
google | android | usbipd | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbipd.c | 14,340 | utf_8 | f7ca96a8fc48282ea862ea0738ad16fd | /*
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#define _GNU_SOURCE
#include <errno.h>
#include <unistd.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_LIBWRAP
#include... |
google | android | usbip_unbind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_unbind.c | 3,494 | utf_8 | d7e9057c81b09e44608a3c24308016bd | /*
*/
#include <libudev.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include "usbip_common.h"
#include "utils.h"
#include "usbip.h"
#include "sysfs_utils.h"
static const char usbip_unbind_usage_string[] =
"usbip unbind <args>\n"
" -b, --busid=<busid> Unbind " USBIP_HOST_DRV... |
google | android | usbip_attach | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_attach.c | 4,876 | utf_8 | 3b450e312b85d595c1de20255693e30a | /*
*/
#include <sys/stat.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <getopt.h>
#include <unistd.h>
#include <errno.h>
#include "vhci_driver.h"
#include "usbip_common.h"
#include "usbip_network.h"
#include "usbip.h"
static const char usbip_attach_usage_... |
google | android | usbip_bind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_bind.c | 4,883 | utf_8 | 9257eafd311a8f78b2d90fa8cbd0e257 | /*
*/
#include <libudev.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include "usbip_common.h"
#include "utils.h"
#include "usbip.h"
#include "sysfs_utils.h"
enum unbind_status {
UNBIND_ST_OK,
UNBIND_ST_USBIP_HOST,
UNBIND_ST_FAILED
};
static const char usbip_b... |
google | android | usbip | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip.c | 4,348 | utf_8 | c71f3ec7f8a343d9743345559eb8ac79 | /*
* command structure borrowed from udev
* (git://git.kernel.org/pub/scm/linux/hotplug/udev.git)
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <syslog.h>
#include "usbip_common.h"
#include "usbip_network.h"
#include "usbip.h"
static int usbip_help(int argc, char *argv[]);
static int usbi... |
google | android | usbip_detach | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_detach.c | 2,328 | utf_8 | c6827ca0d69e935d56692663c209f1c2 | /*
*/
#include <ctype.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <unistd.h>
#include "vhci_driver.h"
#include "usbip_common.h"
#include "usbip_network.h"
#include "usbip.h"
static const char usbip_detach_usage_string[] =
"usbip de... |
google | android | usbip_network | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_network.c | 6,061 | utf_8 | 59edb7ec7fdae59af77819d4b68814bd | /*
*/
#include <sys/socket.h>
#include <string.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/tcp.h>
#include <unistd.h>
#ifdef HAVE_LIBWRAP
#include <tcpd.h>
#endif
#include "usbip_common.h"
#include "usbip_network.h"
int usbip_port = 3240;
char *usbip_port_string = "3240";
void usbip_setup_port_numbe... |
google | android | usbip_list | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/usbip/src/usbip_list.c | 7,120 | utf_8 | a541fd2ded24db408a5be9aa77f738b3 | /*
*/
#include <sys/types.h>
#include <libudev.h>
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <netdb.h>
#include <unistd.h>
#include "usbip_common.h"
#include "usbip_network.h"
#include "usbip.h"
static const char u... |
google | android | test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/ffs-aio-example/multibuff/host_app/test.c | 4,399 | utf_8 | 2efda11872ee9c97716138cf6d826aad | /*
*/
#include <libusb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define VENDOR 0x1d6b
#define PRODUCT 0x0105
#define BUF_LEN 8192
/*
* struct test_state - describes test program state
* reattached at the end of test program
*/
struct test_state {
libusb_device *found;
libusb_conte... |
google | android | aio_multibuff | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c | 9,268 | utf_8 | 41b94c9a7dd8ccc4d6e70681239cd4bf | /*
*/
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/poll.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/eventfd.h>
#include "libaio.h"
... |
google | android | test | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/ffs-aio-example/simple/host_app/test.c | 4,554 | utf_8 | 2ef1eae958da7cc9d70fe9607723f164 | /*
*/
#include <libusb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define VENDOR 0x1d6b
#define PRODUCT 0x0105
#define BUF_LEN 8192
/*
* struct test_state - describes test program state
* reattached at the end of test program
*/
struct test_state {
libusb_device *found;
libusb_conte... |
google | android | aio_simple | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c | 9,108 | utf_8 | a097fe6a71513d718d9d6a6231654b4c | /*
*/
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/poll.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/eventfd.h>
#include "libaio.h"
... |
google | android | page_owner_sort | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/vm/page_owner_sort.c | 2,890 | utf_8 | 4fb0bcf0cf3b4d81e20fc892d331e6ce | /*
* User-space helper to sort the output of /sys/kernel/debug/page_owner
*
* Example use:
* cat /sys/kernel/debug/page_owner > page_owner_full.txt
* grep -v ^PFN page_owner_full.txt > page_owner.txt
* ./sort page_owner.txt sorted_page_owner.txt
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#i... |
google | android | slabinfo | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/vm/slabinfo.c | 36,849 | utf_8 | b9ddf65ce5ef6efdf4c51dbfabaf711f | /*
* Slabinfo: Tool to get reports about slabs
*
*
* Compile with:
*
* gcc -o slabinfo slabinfo.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <getopt.h>
#include <regex.h>
#include <... |
google | android | page-types | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/vm/page-types.c | 25,890 | utf_8 | fd291f399defbcb44033f5b2713307be | /*
* page-types: Tool for querying page flags
*
*/
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <getopt.h>
#include <limits.h>
#include <assert.h>
#include <ftw.h>
#include <time.h>
#in... |
google | android | hv_kvp_daemon | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/hv/hv_kvp_daemon.c | 36,949 | utf_8 | 292ced879e33c28fff39994e6d1b3197 | /*
* An implementation of key value pair (KVP) functionality for Linux.
*
*
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#inc... |
google | android | hv_vss_daemon | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/hv/hv_vss_daemon.c | 6,154 | utf_8 | 73d16e55a4eaf7ec4b7964052209520e | /*
* An implementation of the host initiated guest snapshot for Hyper-V.
*
*
* details.
*
*/
#include <sys/types.h>
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdio.h>
#include <mntent.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <errno.... |
google | android | hv_fcopy_daemon | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/hv/hv_fcopy_daemon.c | 5,339 | utf_8 | 3311add6e715f6f4bfebf45b8910ed8d | /*
* An implementation of host to guest copy functionality for Linux.
*
* details.
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <er... |
google | android | builtin-help | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-help.c | 12,401 | utf_8 | e3f00794d5d73f43cadb8c5896a9699e | /*
* builtin-help.c
*
* Builtin help command
*/
#include "perf.h"
#include "util/cache.h"
#include "builtin.h"
#include "util/exec_cmd.h"
#include "common-cmds.h"
#include "util/parse-options.h"
#include "util/run-command.h"
#include "util/help.h"
#include "util/debug.h"
static struct man_viewer_list {
struct man... |
google | android | builtin-report | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-report.c | 28,597 | utf_8 | ca3cf336bae05ea7d5da667f810ce99c | /*
* builtin-report.c
*
* Builtin report command: Analyze the perf.data input file,
* look up and read DSOs and symbol information and display
* a histogram of results, along various sorting keys.
*/
#include "builtin.h"
#include "util/util.h"
#include "util/cache.h"
#include "util/annotate.h"
#include "util/co... |
google | android | builtin-kvm | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-kvm.c | 37,801 | utf_8 | 3dc9bd68c1da0ed5ee5ece1256e5f292 | #include "builtin.h"
#include "perf.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/util.h"
#include "util/cache.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
#include "util/intlist.h"
#include "util/parse-options.h"
#include "util/trace-even... |
google | android | builtin-data | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-data.c | 2,633 | utf_8 | 2e0fe02cbcdcc5bf46561e787fd07e8d | #include <linux/compiler.h>
#include "builtin.h"
#include "perf.h"
#include "debug.h"
#include "parse-options.h"
#include "data-convert-bt.h"
typedef int (*data_cmd_fn_t)(int argc, const char **argv, const char *prefix);
struct data_cmd {
const char *name;
const char *summary;
data_cmd_fn_t fn;
};
static struct d... |
google | android | builtin-diff | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-diff.c | 29,886 | utf_8 | 62246c599801b663b66537b153fb6734 | /*
* builtin-diff.c
*
* Builtin diff command: Analyze two perf.data input files, look up and read
* DSOs and symbol information, sort them and produce a diff.
*/
#include "builtin.h"
#include "util/debug.h"
#include "util/event.h"
#include "util/hist.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "ut... |
google | android | builtin-buildid-list | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-buildid-list.c | 3,037 | utf_8 | 5dcdb3762b2d46ca64f35cd0257f0f55 | /*
* builtin-buildid-list.c
*
* Builtin buildid-list command: list buildids in perf.data, in the running
* kernel and in ELF files.
*
*/
#include "builtin.h"
#include "perf.h"
#include "util/build-id.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/parse-options.h"
#include "util/session.h"
#incl... |
google | android | builtin-inject | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-inject.c | 20,050 | utf_8 | 99f82cd30177ede5bf264d09ffd6b80c | /*
* builtin-inject.c
*
* Builtin inject command: Examine the live mode (stdin) event stream
* and repipe it to stdout while optionally injecting additional
* events into it.
*/
#include "builtin.h"
#include "perf.h"
#include "util/color.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/session.... |
google | android | builtin-lock | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-lock.c | 23,688 | utf_8 | 13aa137a8797ca70d0ae5d784f3b48c9 | #include "builtin.h"
#include "perf.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/util.h"
#include "util/cache.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/parse-options.h"
#include "util/trace-event.h"
#include "util/debug.h"
#include "util/sessio... |
google | android | builtin-trace | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-trace.c | 88,548 | utf_8 | 4875025b211da251942b894d9eff8e53 | /*
* builtin-trace.c
*
* Builtin 'trace' command:
*
* Display a continuously updated trace of any workload, CPU, specific PID,
* system wide, etc. Default format is loosely strace like, but any other
* event may be specified using --event.
*
*/
#include <traceevent/event-parse.h>
#include <api/fs/tracing_path... |
google | android | builtin-top | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-top.c | 35,111 | utf_8 | 1e489ea13db7b70b706c6bb939cae319 | /*
* builtin-top.c
*
* Builtin top command: Display a continuously updated profile of
* any workload, CPU or specific PID.
*
*/
#include "builtin.h"
#include "perf.h"
#include "util/annotate.h"
#include "util/cache.h"
#include "util/color.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/machine.... |
google | android | builtin-annotate | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-annotate.c | 10,509 | utf_8 | 38e137fe0b6674260750d8c6be77db36 | /*
* builtin-annotate.c
*
* Builtin annotate command: Analyze the perf.data input file,
* look up and read DSOs and symbol information and display
* a histogram of results, along various sorting keys.
*/
#include "builtin.h"
#include "util/util.h"
#include "util/color.h"
#include <linux/list.h>
#include "util/ca... |
google | android | perf | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/perf.c | 15,186 | utf_8 | 11bcd8547b128196d50b4390cd5c3b5e | /*
* perf.c
*
* Performance analysis utility.
*
* This is the main hub from which the sub-commands (perf stat,
* perf top, perf record, perf report, etc.) are started.
*/
#include "builtin.h"
#include "util/env.h"
#include "util/exec_cmd.h"
#include "util/cache.h"
#include "util/quote.h"
#include "util/run-comm... |
google | android | builtin-bench | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-bench.c | 7,129 | utf_8 | cf1cc34f4edb80cc563304dcad9be1c6 | /*
* builtin-bench.c
*
* General benchmarking collections provided by perf
*
*/
/*
* Available benchmark collection list:
*
* sched ... scheduler and IPC performance
* mem ... memory access performance
* numa ... NUMA scheduling and MM performance
* futex ... Futex performance
*/
#include "perf.h"
#i... |
google | android | builtin-probe | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-probe.c | 16,439 | utf_8 | 1c277c4c5a3edf94ffe72de627140fc0 | /*
* builtin-probe.c
*
* Builtin probe command: Set up probe events by C expression
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h... |
google | android | builtin-sched | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-sched.c | 48,618 | utf_8 | eec93c41571f6a41227e150a9cee4a44 | #include "builtin.h"
#include "perf.h"
#include "util/util.h"
#include "util/evlist.h"
#include "util/cache.h"
#include "util/evsel.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
#include "util/tool.h"
#include "util/cloexec.h"
#include "util/parse-options.h"
#in... |
google | android | builtin-list | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-list.c | 2,638 | utf_8 | 1db8882b4392166b207d524905b12d38 | /*
* builtin-list.c
*
* Builtin list command: list all event types
*
*/
#include "builtin.h"
#include "perf.h"
#include "util/parse-events.h"
#include "util/cache.h"
#include "util/pmu.h"
#include "util/parse-options.h"
int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
{
int i;
bool ra... |
google | android | builtin-mem | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-mem.c | 7,326 | utf_8 | 00aff2eaa268b02a90842d20497ce0a0 | #include "builtin.h"
#include "perf.h"
#include "util/parse-options.h"
#include "util/trace-event.h"
#include "util/tool.h"
#include "util/session.h"
#include "util/data.h"
#define MEM_OPERATION_LOAD 0x1
#define MEM_OPERATION_STORE 0x2
struct perf_mem {
struct perf_tool tool;
char const *input_name;
bool hide_... |
google | android | builtin-script | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-script.c | 52,449 | utf_8 | fa401ca27f2a060125c7ba95b8f69a00 | #include "builtin.h"
#include "perf.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/exec_cmd.h"
#include "util/header.h"
#include "util/parse-options.h"
#include "util/perf_regs.h"
#include "util/session.h"
#include "util/tool.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/trace-e... |
google | android | perf-read-vdso | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/perf-read-vdso.c | 510 | utf_8 | 0a42c63351c847ea34ed3820b1f0d6f7 | #include <stdio.h>
#include <string.h>
#define VDSO__MAP_NAME "[vdso]"
/*
* Include definition of find_vdso_map() also used in util/vdso.c for
* building perf.
*/
#include "util/find-vdso-map.c"
int main(void)
{
void *start, *end;
size_t size, written;
if (find_vdso_map(&start, &end))
return 1;
size = end... |
google | android | builtin-kmem | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-kmem.c | 45,542 | utf_8 | c3876199bb4bb96f39db6c46213cecd9 | #include "builtin.h"
#include "perf.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/util.h"
#include "util/cache.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
#include "util/tool.h"
#include "util/callchain.h"
#include "util/parse-options.h"... |
google | android | builtin-buildid-cache | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-buildid-cache.c | 10,517 | utf_8 | 61f6fb7566de756847d7f0ae79a69b43 | /*
* builtin-buildid-cache.c
*
* Builtin buildid-cache command: Manages build-id cache
*
*/
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <dirent.h>
#include <unistd.h>
#include "builtin.h"
#include "perf.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/header.h"
#include... |
google | android | builtin-evlist | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-evlist.c | 1,836 | utf_8 | 0a76607a8faea47c517aa8eb64265f7c | /*
* Builtin evlist command: Show the list of event selectors present
* in a perf.data file.
*/
#include "builtin.h"
#include "util/util.h"
#include <linux/list.h>
#include "perf.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/parse-events.h"
#include "util/parse-options.h"
#include "util/sessi... |
google | android | builtin-record | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-record.c | 32,649 | utf_8 | b7157d4f99a178c8cdb7d390f24e7b7c | /*
* builtin-record.c
*
* Builtin record command: Record the profile of a workload
* (or a CPU, or a PID) into the perf.data output file - for
* later analysis via perf report.
*/
#include "builtin.h"
#include "perf.h"
#include "util/build-id.h"
#include "util/util.h"
#include "util/parse-options.h"
#include "uti... |
google | android | builtin-timechart | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-timechart.c | 47,975 | utf_8 | 83cf53ffaf9b3193b929ffc86fcbf9e5 | /*
* builtin-timechart.c - make an svg timechart of system activity
*
*/
#include <traceevent/event-parse.h>
#include "builtin.h"
#include "util/util.h"
#include "util/color.h"
#include <linux/list.h>
#include "util/cache.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include <linux/rbtree.h>
#include "util/sy... |
google | android | builtin-stat | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/builtin-stat.c | 36,513 | utf_8 | 49222c5fb931beccce849369747ba24d | /*
* builtin-stat.c
*
* Builtin stat command: Give a precise performance counters summary
* overview about any workload, CPU or specific PID.
*
* Sample output:
$ perf stat ./hackbench 10
Time: 0.118
Performance counter stats for './hackbench 10':
1708.761321 task-clock # 11.037 CPU... |
google | android | Context | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/scripts/python/Perf-Trace-Util/Context.c | 2,627 | utf_8 | 649def7a494cf856022086bf726e58f0 | /*
* Context.c. Python interfaces for perf script.
*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <Python.h>
#include "../../../perf.h"
#include "../../../util/trace-event.h"
PyMODINIT_FUNC initperf_trace_context(void);
static PyObject *perf_trace_context_common_pc(Py... |
google | android | Context | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/scripts/perl/Perf-Trace-Util/Context.c | 3,755 | utf_8 | 245217b5a04807ff0609352345ddd8a6 | /*
* This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the
* contents of Context.xs. Do not edit this file, edit Context.xs instead.
*
* ANY CHANGES MADE HERE WILL BE LOST!
*
*/
#include <stdbool.h>
#ifndef HAS_BOOL
# define HAS_BOOL 1
#endif
#line 1 "Context.xs"
/*
* Context.xs. ... |
google | android | intlist | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/intlist.c | 3,029 | utf_8 | a41d20c86e76a27ddf55a82a5c3317f6 | /*
* Based on intlist.c by:
*/
#include <errno.h>
#include <stdlib.h>
#include <linux/compiler.h>
#include "intlist.h"
static struct rb_node *intlist__node_new(struct rblist *rblist __maybe_unused,
const void *entry)
{
int i = (int)((long)entry);
struct rb_node *rc = NULL;
struct int_node *node = malloc(size... |
google | android | symbol-elf | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/symbol-elf.c | 40,768 | utf_8 | f5f79d805eb2eef9114e04ab8ac3193b | #include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include "symbol.h"
#include "machine.h"
#include "vdso.h"
#include <symbol/kallsyms.h>
#include "debug.h"
#ifndef EM_AARCH64
#define EM_AARCH64 183 /* ARM 64 bit */
#endif
#ifdef HAVE_CPLUS_DEMANGLE_... |
google | android | unwind-libdw | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/unwind-libdw.c | 4,546 | utf_8 | 362ee467cb4d12169227b522efef1323 | #include <linux/compiler.h>
#include <elfutils/libdw.h>
#include <elfutils/libdwfl.h>
#include <inttypes.h>
#include <errno.h>
#include "debug.h"
#include "unwind.h"
#include "unwind-libdw.h"
#include "machine.h"
#include "thread.h"
#include <linux/types.h>
#include "event.h"
#include "perf_regs.h"
static char *debugi... |
google | android | strlist | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/strlist.c | 4,094 | utf_8 | 8aeaf36d857e2e751662714d0fdfd358 | /*
*/
#include "strlist.h"
#include "util.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static
struct rb_node *strlist__node_new(struct rblist *rblist, const void *entry)
{
const char *s = entry;
struct rb_node *rc = NULL;
struct strlist *strlist = container_of(rblist, struct strl... |
google | android | header | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/header.c | 63,056 | utf_8 | 2e6ba6bf23e4e07153bb9e9e446d1a33 | #include "util.h"
#include <sys/types.h>
#include <byteswap.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/list.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <sys/utsname.h>
#include "evlist.h"
#include "evsel.h"
#include "header.h"
#include "../perf.h"
#include "trace-e... |
google | android | probe-file | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/probe-file.c | 7,101 | utf_8 | 3b4056ed438f147c3a64280b0d12f805 | /*
* probe-file.c : operate ftrace k/uprobe events files
*
*
*/
#include "util.h"
#include "event.h"
#include "strlist.h"
#include "debug.h"
#include "cache.h"
#include "color.h"
#include "symbol.h"
#include "thread.h"
#include <api/fs/tracing_path.h>
#include "probe-event.h"
#include "probe-file.h"
#include "sessi... |
google | android | bitmap | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/bitmap.c | 699 | utf_8 | fabadad42f7499af02df02fae8c581ac | /*
* From lib/bitmap.c
* Helper functions for bitmap.h.
*
*/
#include <linux/bitmap.h>
int __bitmap_weight(const unsigned long *bitmap, int bits)
{
int k, w = 0, lim = bits/BITS_PER_LONG;
for (k = 0; k < lim; k++)
w += hweight_long(bitmap[k]);
if (bits % BITS_PER_LONG)
w += hweight_long(bitmap[k] & BITMAP_LA... |
google | android | probe-finder | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/probe-finder.c | 45,223 | utf_8 | d0726d6ee706be7da9dc194d496b3039 | /*
* probe-finder.c : C expression to kprobe event converter
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#in... |
google | android | evsel | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/evsel.c | 58,279 | utf_8 | 2a7dfedc19f8f92cfca3242cc0ee90e1 | /*
*/
#include <byteswap.h>
#include <linux/bitops.h>
#include <api/fs/tracing_path.h>
#include <traceevent/event-parse.h>
#include <linux/hw_breakpoint.h>
#include <linux/perf_event.h>
#include <linux/err.h>
#include <sys/resource.h>
#include "asm/bug.h"
#include "callchain.h"
#include "cgroup.h"
#include "evsel.h"
#... |
google | android | auxtrace | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/auxtrace.c | 32,193 | utf_8 | e0118f48d3cc01686134b7606e5b2f81 | /*
* auxtrace.c: AUX area trace support
* more details.
*
*/
#include <sys/types.h>
#include <sys/mman.h>
#include <stdbool.h>
#include <linux/kernel.h>
#include <linux/perf_event.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include <linux/string.h>
#include <sys/param.h>
#include ... |
google | android | parse-branch-options | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/parse-branch-options.c | 2,038 | utf_8 | ae382258b4e722d49f1bba23c303e770 | #include "perf.h"
#include "util/util.h"
#include "util/debug.h"
#include "util/parse-options.h"
#include "util/parse-branch-options.h"
#define BRANCH_OPT(n, m) \
{ .name = n, .mode = (m) }
#define BRANCH_END { .name = NULL }
struct branch_mode {
const char *name;
int mode;
};
static const struct branch_mode bra... |
google | android | usage | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/usage.c | 1,854 | utf_8 | 6c402bbfe6ce565b4071605009042d2d | /*
* usage.c
*
* Various reporting routines.
* Originally copied from GIT source.
*
*/
#include "util.h"
#include "debug.h"
static void report(const char *prefix, const char *err, va_list params)
{
char msg[1024];
vsnprintf(msg, sizeof(msg), err, params);
fprintf(stderr, " %s%s\n", prefix, msg);
}
static NORET... |
google | android | unwind-libunwind | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/unwind-libunwind.c | 15,479 | utf_8 | 3208fa6e8f841fc986ba895c04d1c60d | /*
* Post mortem Dwarf CFI based unwinding on top of regs and stack dumps.
*
* Lots of this code have been borrowed or heavily inspired from parts of
* the libunwind 0.99 code which are (amongst other contributors I may have
* forgotten):
*
*
*/
#include <elf.h>
#include <gelf.h>
#include <fcntl.h>
#include <st... |
google | android | ctype | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/ctype.c | 1,465 | utf_8 | 325a8822021d42c2d6eb1719e6833ee9 | /*
* Sane locale-independent, ASCII ctype.
*
* No surprises, and works with signed and unsigned chars.
*/
#include "util.h"
enum {
S = GIT_SPACE,
A = GIT_ALPHA,
D = GIT_DIGIT,
G = GIT_GLOB_SPECIAL, /* *, ?, [, \\ */
R = GIT_REGEX_SPECIAL, /* $, (, ), +, ., ^, {, | * */
P = GIT_PRINT_EXTRA, /* printable - alp... |
google | android | parse-regs-options | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/parse-regs-options.c | 1,259 | utf_8 | a6319756ecd29a98e2d2622266d7d425 | #include "perf.h"
#include "util/util.h"
#include "util/debug.h"
#include "util/parse-options.h"
#include "util/parse-regs-options.h"
int
parse_regs(const struct option *opt, const char *str, int unset)
{
uint64_t *mode = (uint64_t *)opt->value;
const struct sample_reg *r;
char *s, *os = NULL, *p;
int ret = -1;
... |
google | android | config | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/config.c | 11,260 | utf_8 | 107d19d28ebf6fa21568df08bccebd03 | /*
* config.c
*
* Helper functions for parsing config items.
* Originally copied from GIT source.
*
*
*/
#include "util.h"
#include "cache.h"
#include "exec_cmd.h"
#include "util/hist.h" /* perf_hist_config */
#include "util/llvm-utils.h" /* perf_llvm_config */
#define MAXNAME (256)
#define DEBUG_CACHE_DIR ".... |
google | android | find-vdso-map | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/find-vdso-map.c | 581 | utf_8 | e47b32574994401f925f7ed4c5d490a8 | static int find_vdso_map(void **start, void **end)
{
FILE *maps;
char line[128];
int found = 0;
maps = fopen("/proc/self/maps", "r");
if (!maps) {
fprintf(stderr, "vdso: cannot open maps\n");
return -1;
}
while (!found && fgets(line, sizeof(line), maps)) {
int m = -1;
/* We care only about private r-x... |
google | android | lzma | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/lzma.c | 2,085 | utf_8 | 4119d9e272e8d47d1098e888ffe64f89 | #include <lzma.h>
#include <stdio.h>
#include <linux/compiler.h>
#include "util.h"
#include "debug.h"
#define BUFSIZE 8192
static const char *lzma_strerror(lzma_ret ret)
{
switch ((int) ret) {
case LZMA_MEM_ERROR:
return "Memory allocation failed";
case LZMA_OPTIONS_ERROR:
return "Unsupported decompressor flag... |
google | android | intel-bts | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/intel-bts.c | 22,717 | utf_8 | 97361b69d069f8ae25c9a028ae5e9636 | /*
* intel-bts.c: Intel Processor Trace support
* more details.
*
*/
#include <endian.h>
#include <byteswap.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include "cpumap.h"
#include "color.h"
#include "evsel.h"
#include "evlist.h"
#include "machine.h"
#incl... |
google | android | probe-event | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/probe-event.c | 67,355 | utf_8 | 15ba2fc663a28bf2be8980d84d22afa3 | /*
* probe-event.c : perf-probe definition to probe_events format converter
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include... |
google | android | intel-pt | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/intel-pt.c | 53,927 | utf_8 | 0bd475adc11e4e850a54fdc854853e87 | /*
* intel_pt.c: Intel Processor Trace support
* more details.
*
*/
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include "../perf.h"
#include "session.h"
#include "machine.h"
#include "sort.h"
#include "tool.h"
#include "event.h"
#include "evlist.h"
... |
google | android | trace-event-info | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/trace-event-info.c | 11,514 | utf_8 | 334ef6b277d03e41aa1577717b3fb1a1 | /*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include "util.h"
#include <dirent.h>
#include <mntent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/type... |
google | android | tsc | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/tsc.c | 615 | utf_8 | 5d956ca6922b7a62197f000838909d0e | #include <linux/compiler.h>
#include <linux/types.h>
#include "tsc.h"
u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc)
{
u64 t, quot, rem;
t = ns - tc->time_zero;
quot = t / tc->time_mult;
rem = t % tc->time_mult;
return (quot << tc->time_shift) +
(rem << tc->time_shift) / tc->time_mult;
}
... |
google | android | sigchain | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/sigchain.c | 976 | utf_8 | 97611192bf70902c9aa1d7d8ec7fb791 | #include "sigchain.h"
#include "cache.h"
#define SIGCHAIN_MAX_SIGNALS 32
struct sigchain_signal {
sigchain_fun *old;
int n;
int alloc;
};
static struct sigchain_signal signals[SIGCHAIN_MAX_SIGNALS];
static void check_signum(int sig)
{
if (sig < 1 || sig >= SIGCHAIN_MAX_SIGNALS)
die("BUG: signal out of range: %... |
google | android | annotate | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/annotate.c | 39,719 | utf_8 | c67cfe7f8b2f3ccd80c09ed6222c5a92 | /*
*/
#include "util.h"
#include "ui/ui.h"
#include "sort.h"
#include "build-id.h"
#include "color.h"
#include "cache.h"
#include "symbol.h"
#include "debug.h"
#include "annotate.h"
#include "evsel.h"
#include <regex.h>
#include <pthread.h>
#include <linux/bitops.h>
const char *disassembler_style;
const char *objdump... |
google | android | util | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/util.c | 12,266 | utf_8 | bbc20b5b933da4bc80e9504948f8b8b2 | #include "../perf.h"
#include "util.h"
#include "debug.h"
#include <api/fs/fs.h>
#include <sys/mman.h>
#include <sys/utsname.h>
#ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <byteswap.h>
#include <lin... |
google | android | abspath | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/abspath.c | 883 | utf_8 | 32421cca4eaacfc02ec3f50f8de32417 | #include "cache.h"
static const char *get_pwd_cwd(void)
{
static char cwd[PATH_MAX + 1];
char *pwd;
struct stat cwd_stat, pwd_stat;
if (getcwd(cwd, PATH_MAX) == NULL)
return NULL;
pwd = getenv("PWD");
if (pwd && strcmp(pwd, cwd)) {
stat(cwd, &cwd_stat);
if (!stat(pwd, &pwd_stat) &&
pwd_stat.st_dev ==... |
google | android | parse-events | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/parse-events.c | 49,124 | utf_8 | c3a33d66ef6c6991bb94489a9d726351 | #include <linux/hw_breakpoint.h>
#include <linux/err.h>
#include "util.h"
#include "../perf.h"
#include "evlist.h"
#include "evsel.h"
#include "parse-options.h"
#include "parse-events.h"
#include "exec_cmd.h"
#include "string.h"
#include "symbol.h"
#include "cache.h"
#include "header.h"
#include "bpf-loader.h"
#include... |
google | android | cloexec | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/cloexec.c | 1,818 | utf_8 | 56e07e7939459596811474408a2641e0 | #include <sched.h>
#include "util.h"
#include "../perf.h"
#include "cloexec.h"
#include "asm/bug.h"
#include "debug.h"
static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
#ifdef __GLIBC_PREREQ
#if !__GLIBC_PREREQ(2, 6)
int __weak sched_getcpu(void)
{
errno = ENOSYS;
return -1;
}
#endif
#endif
static int perf_flag_probe... |
google | android | data-convert-bt | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/data-convert-bt.c | 27,127 | utf_8 | 18ff88272995a78a2c1e45add85e5e99 | /*
* CTF writing support via babeltrace.
*
*/
#include <linux/compiler.h>
#include <babeltrace/ctf-writer/writer.h>
#include <babeltrace/ctf-writer/clock.h>
#include <babeltrace/ctf-writer/stream.h>
#include <babeltrace/ctf-writer/event.h>
#include <babeltrace/ctf-writer/event-types.h>
#include <babeltrace/ctf-write... |
google | android | perf_regs | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/perf_regs.c | 558 | utf_8 | 926063aa847e269bcd418d9db170a2c7 | #include <errno.h>
#include "perf_regs.h"
#include "event.h"
const struct sample_reg __weak sample_reg_masks[] = {
SMPL_REG_END
};
#ifdef HAVE_PERF_REGS_SUPPORT
int perf_reg_value(u64 *valp, struct regs_dump *regs, int id)
{
int i, idx = 0;
u64 mask = regs->mask;
if (regs->cache_mask & (1 << id))
goto out;
i... |
google | android | target | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/target.c | 3,511 | utf_8 | 2ac34d76037adbab2e658c1465995124 | /*
* Helper functions for handling target threads/cpus
*
*/
#include "target.h"
#include "debug.h"
#include <pwd.h>
#include <string.h>
enum target_errno target__validate(struct target *target)
{
enum target_errno ret = TARGET_ERRNO__SUCCESS;
if (target->pid)
target->tid = target->pid;
/* CPU and PID are mutual... |
google | android | machine | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/machine.c | 49,807 | utf_8 | 148204f43a53dc84073ebe1826e6972f | #include "callchain.h"
#include "debug.h"
#include "event.h"
#include "evsel.h"
#include "hist.h"
#include "machine.h"
#include "map.h"
#include "sort.h"
#include "strlist.h"
#include "thread.h"
#include "vdso.h"
#include <stdbool.h>
#include <symbol/kallsyms.h>
#include "unwind.h"
#include "linux/hash.h"
static void ... |
google | android | thread-stack | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/thread-stack.c | 17,550 | utf_8 | 8de01e51fd3e1d42b9f14edf3f52af3d | /*
* thread-stack.c: Synthesize a thread's stack using call / return events
* more details.
*
*/
#include <linux/rbtree.h>
#include <linux/list.h>
#include "thread.h"
#include "event.h"
#include "machine.h"
#include "util.h"
#include "debug.h"
#include "symbol.h"
#include "comm.h"
#include "thread-stack.h"
#define ... |
google | android | run-command | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/run-command.c | 4,250 | utf_8 | b61d5c6d2e24faa67b0a357c441df724 | #include "cache.h"
#include "run-command.h"
#include "exec_cmd.h"
#include "debug.h"
static inline void close_pair(int fd[2])
{
close(fd[0]);
close(fd[1]);
}
static inline void dup_devnull(int to)
{
int fd = open("/dev/null", O_RDWR);
dup2(fd, to);
close(fd);
}
int start_command(struct child_process *cmd)
{
in... |
google | android | ordered-events | .c | platform/hardware/bsp/kernel/intel/edison-v4.4/tools/perf/util/ordered-events.c | 7,266 | utf_8 | 54770859584d3cad98ac8ddeaebd17c8 | #include <linux/list.h>
#include <linux/compiler.h>
#include <linux/string.h>
#include "ordered-events.h"
#include "session.h"
#include "asm/bug.h"
#include "debug.h"
#define pr_N(n, fmt, ...) \
eprintf(n, debug_ordered_events, fmt, ##__VA_ARGS__)
#define pr(fmt, ...) pr_N(1, pr_fmt(fmt), ##__VA_ARGS__)
static void... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.