Skip to content

Instantly share code, notes, and snippets.

At work, slow start up

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 31.15    0.003262          11       294           munmap
 10.59    0.001109           1       866         8 stat
  8.64    0.000905           1       617        32 open
  7.36    0.000771           3       236       159 recvmsg
  6.83    0.000715           2       401           read
  6.70    0.000702           4       177           poll
@rickyzhang82
rickyzhang82 / conftest.cpp
Last active August 19, 2017 17:55
test program on page zero mapping
/* confdefs.h */
#define PACKAGE_NAME "Basilisk II"
#define PACKAGE_TARNAME "BasiliskII"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "Basilisk II 1.0"
#define PACKAGE_BUGREPORT "Christian.Bauer@uni-mainz.de"
#define PACKAGE_URL ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
@rickyzhang82
rickyzhang82 / configure.ac
Created August 19, 2017 18:00
part of configure.ac that determines addressing mode
if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
ADDRESSING_MODE="real"
else
ADDRESSING_MODE=""
AC_MSG_CHECKING([for the addressing mode to use])
for am in $ADDRESSING_TEST_ORDER; do
case $am in
real)
dnl Requires ability to mmap() Low Memory globals
if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
@rickyzhang82
rickyzhang82 / libgcc_main.log
Created September 9, 2017 20:39
libgcc main.log
This file has been truncated, but you can view the full file.
version:1
:debug:clean Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc7/libgcc/work /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc7/work
:debug:clean dropping privileges: euid changed to 502, egid changed to 500.
:debug:main Executing org.macports.main (libgcc)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:archivefetch archivefetch phase started at Sat Sep 9 15:27:36 EDT 2017
:msg:archivefetch ---> Fetching archive for libgcc
:debug:archivefetch Executing org.macports.archivefetch (libgcc)
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/incoming to macports
@rickyzhang82
rickyzhang82 / stack_trace_bii.log
Created September 10, 2017 17:35
stack trace BII
PID: 7087 (BasiliskII)
UID: 1000 (Ricky)
GID: 1000 (Ricky)
Signal: 11 (SEGV)
Timestamp: Sun 2017-09-10 13:25:18 EDT (7min ago)
Command Line: ./BasiliskII
Executable: /home/Ricky/repo/github/dl-macemu/BasiliskII/src/Unix/BasiliskII
Control Group: /user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
Unit: user@1000.service
User Unit: gnome-terminal-server.service
@rickyzhang82
rickyzhang82 / keycodes.mac
Created September 15, 2017 21:53
Mac OS X keycode for BII
# /usr/share/BasiliskII/keycodes
#
# Basilisk II (C) 1997-2005 Christian Bauer
#
# This file is used to translate the (server-specific) scancodes to
# Mac keycodes depending on the window server being used.
#
# The format of this file is as follows:
#
# sdl <driver string>
@rickyzhang82
rickyzhang82 / keycode.linux
Created September 15, 2017 22:11
Key code for Linux
# /usr/share/BasiliskII/keycodes
#
# Basilisk II (C) 1997-2005 Christian Bauer
#
# This file is used to translate the (server-specific) scancodes to
# Mac keycodes depending on the window server being used.
#
# The format of this file is as follows:
#
# sdl <driver string>
@rickyzhang82
rickyzhang82 / InstallOpenCV.md
Created December 7, 2017 19:35 — forked from jruizvar/InstallOpenCV.md
Building OpenCV 3.2.0 from source on macOS Sierra with Python 3 support

Building OpenCV 3.2.0 from source with Python 3 support

Install OpenCV on macOS Sierra enabling Python 3 with the following instructions:

  • Install CMake, Python 3 + Numpy in advance
  • Download latest OpenCV source code (https://github.com/opencv/opencv/releases)
  • Move the folder opencv-3.2.0 to the current directory
  • In the current directory, execute the following steps:
mkdir build
@rickyzhang82
rickyzhang82 / Good IOS RTSP Player.md
Created December 18, 2017 17:55 — forked from oc2pcoj/Good IOS RTSP Player.md
iOS RTSP player for IP video cameras
@rickyzhang82
rickyzhang82 / CuraEngine_parts_output_data_format.md
Last active May 15, 2018 12:02
Cura parts output file format

Parts output format

File format:

model size:40598 81398; maximum (x,y) of the model.
volume index:0 ; the index of volumes
layer index:0 ; the index of layer in current volume
part index:0 ; the index of part in current layer
outline index:0 ; the index of outline in current part
x0 y0 x1 y1 x2 y2;  Start to output list of point (x,y) of the 1st polygon
x0 y0 x1 y1 x2 y2 x3 y3; 2nd polygon