Script:
stap -e '
global lines;
probe syscall.write {
if(execname() == "alloc-bench" && fd == 2) {
line = lines[pid()] . user_string_n(buf_uaddr, count);
if(isinstr(line, "\n")) {
Script:
stap -e '
global lines;
probe syscall.write {
if(execname() == "alloc-bench" && fd == 2) {
line = lines[pid()] . user_string_n(buf_uaddr, count);
if(isinstr(line, "\n")) {
import subprocess | |
import os | |
import re | |
PCIIDS = '/usr/share/pci.ids' | |
DRVDIR = 'drivers/scsi' | |
# Build pci ids database | |
pci_ids = {} |
from multiprocessing import Pool | |
from itertools import chain | |
import re | |
import sys | |
PROC_COUNT = 8 | |
LINES_PER_PROC = 40 | |
if len(sys.argv) != 3: |
CFLAGS = -g | |
CC = gcc | |
LDFLAGS = -lrt | |
OBJS = common.o algorithm.o libptmalloc3.a | |
algorithm.o: algorithm.c algorithm.h | |
$(CC) $(CFLAGS) -o $@ -c algorithm.c | |
common.o: common.c common.h |
import time | |
import os | |
import math | |
cpu_stats = ['yld_count', | |
'sched_count', 'sched_goidle', | |
'ttwu_count', 'ttwu_local', | |
'rq_cpu_time', | |
'rq_sched_info.run_delay', 'rq_sched_info.pcount'] | |
cpu_idle_types = ['CPU_IDLE', 'CPU_NOT_IDLE', 'CPU_NEWLY_IDLE'] |
root@r520:~# apt-get update | |
Hit http://mirror.yandex.ru wheezy Release.gpg | |
Hit http://mirror.yandex.ru wheezy Release | |
Hit http://mirror.yandex.ru wheezy/main Sources | |
Hit http://mirror.yandex.ru wheezy/main amd64 Packages | |
Hit http://mirror.yandex.ru wheezy/main i386 Packages | |
Hit http://mirror.yandex.ru wheezy/main Translation-en | |
Reading package lists... Done | |
root@r520:~# stap -e 'probe kprocess.exec { println(argstr); }' |
Consider following configuration (Solaris 11):
root@sol112:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2
inet 192.168.24.33 netmask ffffff00 broadcast 192.168.24.255
ether 8:0:27:75:c9:5d
net1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
inet 192.168.100.16 netmask ffffff00 broadcast 192.168.100.255
#include <unordered_map> | |
#include <mutex> | |
#include <list> | |
#include <future> | |
#include <iostream> | |
#include <chrono> | |
#include <algorithm> | |
#include <atomic> | |
#include "tbb/concurrent_unordered_map.h" |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <linux/perf_event.h> | |
#include <sys/syscall.h> | |
#include <asm/unistd.h> | |
#include <sys/mman.h> | |
#include <numaif.h> |
#include <stdlib.h> | |
#include <string.h> | |
#ifdef AAS_STRICT | |
typedef struct { char a; } *aas_t; | |
#else | |
typedef char *aas_t; | |
#endif | |
#define AAS_DYNAMIC 'D' |