- SATLIB: http://www.cs.ubc.ca/~hoos/SATLIB/benchm.html
- Uniform random 3-SAT
- variable: 20 ~ 250
- clause: 100 ~ 1000
- Uniform random 3-SAT
- Model RB: http://www.nlsde.buaa.edu.cn/~kexu/benchmarks/benchmarks.htm
- variable: 500 ~ 1500
KVM ARM paper
- trap-and-emulate: 虛擬化重要觀念
- 可以跟傳統 OS 的 system call 做比較
- external interrupt, CPU exception(trap), and software interrupt
- http://wiki.osdev.org/Interrupts
- page fault trap is important in hypervisor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import ctypes | |
ctypes.cdll.LoadLibrary('libc.so.6') | |
libc = ctypes.CDLL('libc.so.6') | |
def main(): | |
if len(sys.argv) != 3: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import sys | |
import subprocess as sp | |
import os | |
# Please modify EFLOW_BASE_DIR to eflow repository root dir if you move this script to other directory. | |
EFLOW_BASE_DIR = ".." |
- 官方的教學文件: http://valgrind.org/docs/manual/manual-writing-tools.html
- 朋友的筆記, 基本上就是跑完官方文件, 有修正一點官方文件過舊的地方(autotool): https://github.com/wdv4758h/notes/blob/797f11e8d09edc761f38cc72254ee6f8e53d857f/valgrind/new-plugin.rst
- 閱讀程式碼, nulgrind 是空的 tool, lackey 是很簡單的 tool.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
PACMAN_QL = './pacman_Ql' | |
FIND = './find' | |
PAC_STR="""acl /home/susu/rootfs/test1/usr/ | |
acl /home/susu/rootfs/test1/usr/bin/ | |
""" | |
FIND_STR="""/home/susu/rootfs/test1/ | |
/home/susu/rootfs/test1/opt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Template shouldn't use primitive type | |
- primitive type to class: boolean => Boolean, int => Integer | |
- e.g. ArrayList<Integer>, List<Integer>, Map<String, Double> | |
2. string join | |
- Java8 has StringJoiner: https://docs.oracle.com/javase/8/docs/api/java/util/StringJoiner.html | |
- [bef Java8] for loop + StringBuilder(fast string concat): http://stackoverflow.com/a/15837355 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_of_matrix = int(input()) | |
matrix_list = [] | |
for matrix_idx in range(num_of_matrix): | |
matrix_list.append(matrix_idx) | |
matrix_row_size = int(input()) | |
for row_idx in range(matrix_row_size): | |
current_row = input().split() |