Skip to content

Instantly share code, notes, and snippets.

💭
Nothing

Suchakra Sharma tuxology

💭
Nothing
View GitHub Profile
@tuxology
tuxology / Vagrantfile
Created Nov 20, 2015
Kernel Development Vagrant Setup
View Vagrantfile
Vagrant.configure(2) do |config|
config.vm.define :kerneldev do |kerneldev|
kerneldev.vm.box = "fedora/23-cloud-base"
kerneldev.vm.provider :libvirt do |domain|
domain.memory = 2048
domain.cpus = 4
end
config.vm.provision :shell, :path => "bootstrap.sh"
end
end
View disable_cpu_scaling.sh
#!/bin/bash
set_scaling_gov() {
gov=${1-performance}
for i in $(ls -1 /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor); do
echo ${gov} | sudo tee $i > /dev/null
done
}
set_scaling_gov
View irqsoff-ubench1-out.txt
[root@linus tracing]# cat trace
# tracer: irqsoff
#
# irqsoff latency trace v1.1.5 on 4.3.0-rc3+
# --------------------------------------------------------------------
# latency: 9994 us, #14/14, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
# -----------------
# | task: insmod-29922 (uid:0 nice:0 policy:0 rt_prio:0)
# -----------------
# => started at: do_one_initcall
View epoc_setup.md

Installing EPOC Emulator

Fedora

  • Install Wine : sudo dnf install wine
  • Download the Symbian OS V5 emulator from here
  • Extract the files under ~/.wine/dosdevices/c:/

Running the EPOC Emulator

@tuxology
tuxology / output.txt
Last active Sep 22, 2015
Ping Latency with ftrace
View output.txt
<idle>-0 [000] d... 318152.015828: do_IRQ <-ret_from_intr
<idle>-0 [000] d.h. 318152.015832: irq_handler_entry: irq=45 name=iwlwifi
<idle>-0 [000] dNh. 318152.015837: sched_wakeup: comm=irq/45-iwlwifi pid=598 prio=49 success=1 target_cpu=000
<idle>-0 [000] d... 318152.015846: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=irq/45-iwlwifi next_pid=598 next_prio=49
irq/45-iwlwifi-598 [000] d.s. 318152.015894: sched_wakeup: comm=ping pid=27782 prio=120 success=1 target_cpu=002
<idle>-0 [002] d... 318152.015943: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=ping next_pid=27782 next_prio=120
ping-27782 [002] .... 318152.015952: sys_exit: NR 47 = 84
ping-27782 [002] .... 318152.015983: sys_exit: NR 1 = 97
View bcc-setup.sh
#!/bin/bash
set -e -x
git clone https://github.com/svinota/pyroute2.git
(cd pyroute2; make install)
numcpu=$(grep -c ^processor /proc/cpuinfo)
git clone https://github.com/iovisor/bcc.git
mkdir bcc/build/
View bpf-llvm-setup.sh
#!/bin/bash
set -e -x
numcpu=$(grep -c ^processor /proc/cpuinfo)
git clone https://github.com/llvm-mirror/llvm.git
git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang
mkdir llvm/build/
cd llvm/build/
cmake .. \
@tuxology
tuxology / lttng-sched-filter.c
Created Dec 8, 2014
LTTng sched_switch eBPF filter
View lttng-sched-filter.c
/*
* addons/lttng-sched-filter.c
*
* A filtered version of sched_switch
*
* Copyright (C) 2014 Suchakra Sharma <suchakrapani.sharma@polymtl.ca>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
@tuxology
tuxology / lttng-netif-filter.c
Last active Jan 2, 2018
LTTng netif_receive_skb eBPF filter
View lttng-netif-filter.c
/*
* addons/lttng-netif-filter.c
*
* A filtered version of netif_receive_skb
*
* Copyright (C) 2014 Suchakra Sharma <suchakrapani.sharma@polymtl.ca>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; only
@tuxology
tuxology / sym2addr-dwarf.c
Created Aug 2, 2013
Gives address of a symbol from a binary (using libdwarf)
View sym2addr-dwarf.c
/*
* Get address from symbol (libdwarf version)
* Based on code by : Eli Bendersky (http://eli.thegreenplace.net)
*
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
You can’t perform that action at this time.