├── Instruments
└── Erlang.tracetemplate
├── erlang-dtrace-examples
├── dist.d
├── dist.systemtap
├── driver1.d
├── driver1.systemtap
├── efile_drv.d
├── efile_drv.systemtap
├── function-calls.d
├── function-calls.systemtap
├── garbage-collection.d
├── garbage-collection.systemtap
├── memory1.d
├── memory1.systemtap
├── messages.d
├── messages.systemtap
├── port1.d
├── port1.systemtap
├── process-scheduling.d
├── process-scheduling.systemtap
├── spawn-exit.d
├── spawn-exit.systemtap
├── user-probe.d
└── user-probe.systemtap
├── riak-1.0.2+dtrace-osx-lion.tar.bz2
└── slides
├── core
├── deck.core.css
├── deck.core.html
├── deck.core.js
└── deck.core.scss
├── dtrace-erlang.css
├── dtrace-erlang.js
├── dtrace-erlang.scss
├── extensions
├── goto
│ ├── deck.goto.css
│ ├── deck.goto.html
│ ├── deck.goto.js
│ └── deck.goto.scss
├── hash
│ ├── deck.hash.css
│ ├── deck.hash.html
│ ├── deck.hash.js
│ └── deck.hash.scss
├── menu
│ ├── deck.menu.css
│ ├── deck.menu.js
│ └── deck.menu.scss
├── navigation
│ ├── deck.navigation.css
│ ├── deck.navigation.html
│ ├── deck.navigation.js
│ └── deck.navigation.scss
├── scale
│ ├── deck.scale.css
│ ├── deck.scale.js
│ └── deck.scale.scss
└── status
│ ├── deck.status.css
│ ├── deck.status.html
│ ├── deck.status.js
│ └── deck.status.scss
├── images
├── custom-instruments.jpg
├── dtrace-architecture.gif
├── dtrace-instruments.jpg
└── efile_drv2.png
├── index.html
├── jquery-1.7.min.js
├── modernizr.custom.js
└── themes
├── style
├── neon.css
├── neon.scss
├── swiss.css
├── swiss.scss
├── web-2.0.css
└── web-2.0.scss
└── transition
├── fade.css
├── fade.scss
├── horizontal-slide.css
├── horizontal-slide.scss
├── vertical-slide.css
└── vertical-slide.scss
/Instruments/Erlang.tracetemplate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argv0/dtrace-erlang-bashochat-12142011/929bedaa9c41734d01bda0a5e09d3ea40309b213/Instruments/Erlang.tracetemplate
--------------------------------------------------------------------------------
/erlang-dtrace-examples/dist.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/dist.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::dist-monitor
22 | {
23 | printf("monitor: pid %d, who %s, what %s, node %s, type %s, reason %s\n",
24 | pid,
25 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3),
26 | copyinstr(arg4));
27 | }
28 |
29 | erlang*:::dist-port_busy
30 | {
31 | printf("dist port_busy: node %s, port %s, remote_node %s, blocked pid %s\n",
32 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3));
33 | /*
34 | * For variable use advice, see:
35 | * http://dtrace.org/blogs/brendan/2011/11/25/dtrace-variable-types/
36 | *
37 | * Howevever, it's quite possible for the blocked events to span
38 | * threads, so we'll use globals.
39 | */
40 | blocked_procs[copyinstr(arg3)] = timestamp;
41 | }
42 |
43 | erlang*:::dist-output
44 | {
45 | printf("dist output: node %s, port %s, remote_node %s bytes %d\n",
46 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
47 | }
48 |
49 | erlang*:::dist-outputv
50 | {
51 | printf("port outputv: node %s, port %s, remote_node %s bytes %d\n",
52 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
53 | }
54 |
55 | erlang*:::process-scheduled
56 | /blocked_procs[copyinstr(arg0)]/
57 | {
58 | pidstr = copyinstr(arg0);
59 | printf("blocked pid %s scheduled now, waited %d microseconds\n",
60 | pidstr, (timestamp - blocked_procs[pidstr]) / 1000);
61 | blocked_procs[pidstr] = 0;
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/dist.systemtap:
--------------------------------------------------------------------------------
1 | /* example usage: stap /path/to/dist.systemtap -x */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 | /*
21 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
22 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
23 | * Note that other variations of the virtual machine also have
24 | * different names, e.g. the debug build of the SMP-enabled VM
25 | * is "beam.debug.smp".
26 | *
27 | * To use a different virtual machine, replace each instance of
28 | * "beam" with "beam.smp" or the VM name appropriate to your
29 | * environment.
30 | */
31 |
32 | probe process("beam").mark("dist-monitor")
33 | {
34 | printf("monitor: pid %d, who %s, what %s, node %s, type %s, reason %s\n",
35 | pid(),
36 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4),
37 | user_string($arg5));
38 | }
39 |
40 | probe process("beam").mark("dist-port_busy")
41 | {
42 | printf("dist port_busy: node %s, port %s, remote_node %s, blocked pid %s\n",
43 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
44 | blocked_procs[user_string($arg4)] = timestamp;
45 | }
46 |
47 | probe process("beam").mark("dist-port_busy")
48 | {
49 | printf("dist port_busy: node %s, port %s, remote_node %s, blocked pid %s\n",
50 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
51 | blocked_procs[user_string($arg4)] = timestamp;
52 | }
53 |
54 | probe process("beam").mark("dist-output")
55 | {
56 | printf("dist output: node %s, port %s, remote_node %s bytes %d\n",
57 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4);
58 | }
59 |
60 | probe process("beam").mark("dist-outputv")
61 | {
62 | printf("port outputv: node %s, port %s, remote_node %s bytes %d\n",
63 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4);
64 | }
65 |
66 | probe process("beam").mark("process-scheduled")
67 | {
68 | pidstr = user_string($arg1);
69 | if (pidstr in blocked_procs) {
70 | printf("blocked pid %s scheduled now, waited %d microseconds\n",
71 | pidstr, (timestamp - blocked_procs[pidstr]) / 1000);
72 | delete blocked_procs[pidstr];
73 | }
74 | }
75 |
76 | global blocked_procs;
77 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/driver1.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/driver1.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::driver-init
22 | {
23 | printf("driver init name %s major %d minor %d flags %d\n",
24 | copyinstr(arg0), arg1, arg2, arg3);
25 | }
26 |
27 | erlang*:::driver-start
28 | {
29 | printf("driver start pid %s driver name %s port %s\n",
30 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
31 | }
32 |
33 | erlang*:::driver-stop
34 | {
35 | printf("driver stop pid %s driver name %s port %s\n",
36 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
37 | }
38 |
39 | erlang*:::driver-finish
40 | {
41 | printf("driver finish driver name %s port %s\n",
42 | copyinstr(arg0), copyinstr(arg1));
43 | }
44 |
45 | erlang*:::driver-flush
46 | {
47 | printf("driver flush pid %s port %s port name %s\n",
48 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
49 | }
50 |
51 | erlang*:::driver-output
52 | {
53 | printf("driver output pid %s port %s port name %s bytes %d\n",
54 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
55 | }
56 |
57 | erlang*:::driver-outputv
58 | {
59 | printf("driver outputv pid %s port %s port name %s bytes %d\n",
60 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
61 | }
62 |
63 | erlang*:::driver-control
64 | {
65 | printf("driver control pid %s port %s port name %s command %d bytes %d\n",
66 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3, arg4);
67 | }
68 |
69 | erlang*:::driver-call
70 | {
71 | printf("driver call pid %s port %s port name %s command %d bytes %d\n",
72 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3, arg4);
73 | }
74 |
75 | erlang*:::driver-event
76 | {
77 | printf("driver event pid %s port %s port name %s\n",
78 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
79 | }
80 |
81 | erlang*:::driver-ready_input
82 | {
83 | printf("driver ready_input pid %s port %s port name %s\n",
84 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
85 | }
86 |
87 | erlang*:::driver-ready_output
88 | {
89 | printf("driver ready_output pid %s port %s port name %s\n",
90 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
91 | }
92 |
93 | erlang*:::driver-timeout
94 | {
95 | printf("driver timeout pid %s port %s port name %s\n",
96 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
97 | }
98 |
99 | erlang*:::driver-ready_async
100 | {
101 | printf("driver ready_async pid %s port %s port name %s\n",
102 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
103 | }
104 |
105 | erlang*:::driver-process_exit
106 | {
107 | printf("driver process_exit pid %s port %s port name %s\n",
108 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
109 | }
110 |
111 | erlang*:::driver-stop_select
112 | {
113 | printf("driver stop_select driver name %s\n", copyinstr(arg0));
114 | }
115 |
116 |
117 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/driver1.systemtap:
--------------------------------------------------------------------------------
1 | /* example usage: stap /path/to/driver1.systemtap -x */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 | /*
21 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
22 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
23 | * Note that other variations of the virtual machine also have
24 | * different names, e.g. the debug build of the SMP-enabled VM
25 | * is "beam.debug.smp".
26 | *
27 | * To use a different virtual machine, replace each instance of
28 | * "beam" with "beam.smp" or the VM name appropriate to your
29 | * environment.
30 | */
31 |
32 | probe process("beam").mark("driver-init")
33 | {
34 | printf("driver init name %s major %d minor %d flags %d\n",
35 | user_string($arg1), $arg2, $arg3, $arg4);
36 | }
37 |
38 | probe process("beam").mark("driver-start")
39 | {
40 | printf("driver start pid %s driver name %s port %s\n",
41 | user_string($arg1), user_string($arg2), user_string($arg3));
42 | }
43 |
44 | probe process("beam").mark("driver-stop")
45 | {
46 | printf("driver stop pid %s driver name %s port %s\n",
47 | user_string($arg1), user_string($arg2), user_string($arg3));
48 | }
49 |
50 | probe process("beam").mark("driver-finish")
51 | {
52 | printf("driver finish driver name %s\n",
53 | user_string($arg1));
54 | }
55 |
56 | probe process("beam").mark("driver-flush")
57 | {
58 | printf("driver flush pid %s port %s port name %s\n",
59 | user_string($arg1), user_string($arg2), user_string($arg3));
60 | }
61 |
62 | probe process("beam").mark("driver-output")
63 | {
64 | printf("driver output pid %s port %s port name %s bytes %d\n",
65 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4);
66 | }
67 |
68 | probe process("beam").mark("driver-outputv")
69 | {
70 | printf("driver outputv pid %s port %s port name %s bytes %d\n",
71 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4);
72 | }
73 |
74 | probe process("beam").mark("driver-control")
75 | {
76 | printf("driver control pid %s port %s port name %s command %d bytes %d\n",
77 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4, $arg5);
78 | }
79 |
80 | probe process("beam").mark("driver-call")
81 | {
82 | printf("driver call pid %s port %s port name %s command %d bytes %d\n",
83 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4, $arg5);
84 | }
85 |
86 | probe process("beam").mark("driver-event")
87 | {
88 | printf("driver event pid %s port %s port name %s\n",
89 | user_string($arg1), user_string($arg2), user_string($arg3));
90 | }
91 |
92 | probe process("beam").mark("driver-ready_input")
93 | {
94 | printf("driver ready_input pid %s port %s port name %s\n",
95 | user_string($arg1), user_string($arg2), user_string($arg3));
96 | }
97 |
98 | probe process("beam").mark("driver-ready_output")
99 | {
100 | printf("driver ready_output pid %s port %s port name %s\n",
101 | user_string($arg1), user_string($arg2), user_string($arg3));
102 | }
103 |
104 | probe process("beam").mark("driver-timeout")
105 | {
106 | printf("driver timeout pid %s port %s port name %s\n",
107 | user_string($arg1), user_string($arg2), user_string($arg3));
108 | }
109 |
110 | probe process("beam").mark("driver-ready_async")
111 | {
112 | printf("driver ready_async pid %s port %s port name %s\n",
113 | user_string($arg1), user_string($arg2), user_string($arg3));
114 | }
115 |
116 | probe process("beam").mark("driver-process_exit")
117 | {
118 | printf("driver process_exit pid %s port %s port name %s\n",
119 | user_string($arg1), user_string($arg2), user_string($arg3));
120 | }
121 |
122 | probe process("beam").mark("driver-stop_select")
123 | {
124 | printf("driver stop_select driver name %s\n", user_string($arg1));
125 | }
126 |
127 |
128 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/efile_drv.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/efile_drv.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | BEGIN
22 | {
23 | op_map[1] = "OPEN";
24 | op_map[2] = "READ";
25 | op_map[3] = "LSEEK";
26 | op_map[4] = "WRITE";
27 | op_map[5] = "FSTAT";
28 | op_map[6] = "PWD";
29 | op_map[7] = "READDIR";
30 | op_map[8] = "CHDIR";
31 | op_map[9] = "FSYNC";
32 | op_map[10] = "MKDIR";
33 | op_map[11] = "DELETE";
34 | op_map[12] = "RENAME";
35 | op_map[13] = "RMDIR";
36 | op_map[14] = "TRUNCATE";
37 | op_map[15] = "READ_FILE";
38 | op_map[16] = "WRITE_INFO";
39 | op_map[19] = "LSTAT";
40 | op_map[20] = "READLINK";
41 | op_map[21] = "LINK";
42 | op_map[22] = "SYMLINK";
43 | op_map[23] = "CLOSE";
44 | op_map[24] = "PWRITEV";
45 | op_map[25] = "PREADV";
46 | op_map[26] = "SETOPT";
47 | op_map[27] = "IPREAD";
48 | op_map[28] = "ALTNAME";
49 | op_map[29] = "READ_LINE";
50 | op_map[30] = "FDATASYNC";
51 | op_map[31] = "FADVISE";
52 | }
53 |
54 | erlang*:::aio_pool-add
55 | {
56 | printf("async I/O pool port %s queue len %d\n", copyinstr(arg0), arg1);
57 | }
58 |
59 | erlang*:::aio_pool-get
60 | {
61 | printf("async I/O pool port %s queue len %d\n", copyinstr(arg0), arg1);
62 | }
63 |
64 | erlang*:::efile_drv-entry
65 | {
66 | printf("efile_drv enter tag={%d,%d} %s%s | %s (%d) | args: %s %s , %d %d (port %s)\n",
67 | arg0, arg1,
68 | arg2 == NULL ? "" : "user tag ",
69 | arg2 == NULL ? "" : copyinstr(arg2),
70 | op_map[arg3], arg3,
71 | arg4 == NULL ? "" : copyinstr(arg4),
72 | arg5 == NULL ? "" : copyinstr(arg5), arg6, arg7,
73 | /* NOTE: port name in args[10] is experimental */
74 | copyinstr((user_addr_t) args[10]))
75 | }
76 |
77 | erlang*:::efile_drv-int*
78 | {
79 | printf("async I/O worker tag={%d,%d} | %s (%d) | %s\n",
80 | arg0, arg1, op_map[arg2], arg2, probename);
81 | }
82 |
83 | /* efile_drv-return error case */
84 | erlang*:::efile_drv-return
85 | /arg4 == 0/
86 | {
87 | printf("efile_drv return tag={%d,%d} %s%s | %s (%d) | errno %d\n",
88 | arg0, arg1,
89 | arg2 == NULL ? "" : "user tag ",
90 | arg2 == NULL ? "" : copyinstr(arg2),
91 | op_map[arg3], arg3,
92 | arg5);
93 | }
94 |
95 | /* efile_drv-return success case */
96 | erlang*:::efile_drv-return
97 | /arg4 != 0/
98 | {
99 | printf("efile_drv return tag={%d,%d} %s | %s (%d) ok\n",
100 | arg0, arg1,
101 | arg2 == NULL ? "" : copyinstr(arg2),
102 | op_map[arg3], arg3);
103 | }
104 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/efile_drv.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe begin
32 | {
33 | op_map[1] = "OPEN";
34 | op_map[2] = "READ";
35 | op_map[3] = "LSEEK";
36 | op_map[4] = "WRITE";
37 | op_map[5] = "FSTAT";
38 | op_map[6] = "PWD";
39 | op_map[7] = "READDIR";
40 | op_map[8] = "CHDIR";
41 | op_map[9] = "FSYNC";
42 | op_map[10] = "MKDIR";
43 | op_map[11] = "DELETE";
44 | op_map[12] = "RENAME";
45 | op_map[13] = "RMDIR";
46 | op_map[14] = "TRUNCATE";
47 | op_map[15] = "READ_FILE";
48 | op_map[16] = "WRITE_INFO";
49 | op_map[19] = "LSTAT";
50 | op_map[20] = "READLINK";
51 | op_map[21] = "LINK";
52 | op_map[22] = "SYMLINK";
53 | op_map[23] = "CLOSE";
54 | op_map[24] = "PWRITEV";
55 | op_map[25] = "PREADV";
56 | op_map[26] = "SETOPT";
57 | op_map[27] = "IPREAD";
58 | op_map[28] = "ALTNAME";
59 | op_map[29] = "READ_LINE";
60 | op_map[30] = "FDATASYNC";
61 | op_map[31] = "FADVISE";
62 | }
63 |
64 | probe process("beam").mark("aio_pool-add")
65 | {
66 | printf("async I/O pool port %s queue len %d\n", user_string($arg1), $arg2);
67 | }
68 |
69 | probe process("beam").mark("aio_pool-get")
70 | {
71 | printf("async I/O pool port %s queue len %d\n", user_string($arg1), $arg2);
72 | }
73 |
74 | probe process("beam").mark("efile_drv-entry")
75 | {
76 | printf("efile_drv enter tag={%d,%d} %s%s | %s (%d) | args: %s %s , %d %d (port %s)\n",
77 | $arg1, $arg2,
78 | $arg3 == NULL ? "" : "user tag ",
79 | $arg3 == NULL ? "" : user_string($arg3),
80 | op_map[$arg4], $arg4,
81 | $arg5 == NULL ? "" : user_string($arg5),
82 | $arg6 == NULL ? "" : user_string($arg6), $arg7, $arg8,
83 | /* NOTE: port name in $arg[11] is experimental */
84 | user_string($arg11))
85 | }
86 |
87 | probe process("beam").mark("efile_drv-int*")
88 | {
89 | printf("async I/O worker tag={%d,%d} | %s (%d) | %s\n",
90 | $arg1, $arg2, op_map[$arg3], $arg3, probefunc());
91 | }
92 |
93 | probe process("beam").mark("efile_drv-return")
94 | {
95 | if ($arg5 == 0) {
96 | /* efile_drv-return error case */
97 | printf("efile_drv return tag={%d,%d} %s%s | %s (%d) | errno %d\n",
98 | $arg1, $arg2,
99 | $arg3 == NULL ? "" : "user tag ",
100 | $arg3 == NULL ? "" : user_string($arg3),
101 | op_map[$arg4], $arg4,
102 | $arg6);
103 | } else {
104 | /* efile_drv-return success case */
105 | printf("efile_drv return tag={%d,%d} %s | %s (%d) ok\n",
106 | $arg1, $arg2,
107 | $arg3 == NULL ? "" : user_string($arg3),
108 | op_map[$arg4], $arg4);
109 | }
110 | }
111 |
112 | global op_map;
113 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/function-calls.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/function-calls.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::function-entry
22 | {
23 | printf("pid %s enter %s depth %d\n",
24 | copyinstr(arg0), copyinstr(arg1), arg2);
25 | }
26 |
27 | erlang*:::function-return
28 | {
29 | printf("pid %s return %s depth %d\n",
30 | copyinstr(arg0), copyinstr(arg1), arg2);
31 | }
32 |
33 | erlang*:::bif-entry
34 | {
35 | printf("pid %s BIF entry mfa %s\n", copyinstr(arg0), copyinstr(arg1));
36 | }
37 |
38 | erlang*:::bif-return
39 | {
40 | printf("pid %s BIF return mfa %s\n", copyinstr(arg0), copyinstr(arg1));
41 | }
42 |
43 | erlang*:::nif-entry
44 | {
45 | printf("pid %s NIF entry mfa %s\n", copyinstr(arg0), copyinstr(arg1));
46 | }
47 |
48 | erlang*:::nif-return
49 | {
50 | printf("pid %s NIF return mfa %s\n", copyinstr(arg0), copyinstr(arg1));
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/function-calls.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("beam").mark("function-entry")
32 | {
33 | printf("pid %s enter %s depth %d\n",
34 | user_string($arg1), user_string($arg2), $arg3);
35 | }
36 |
37 | probe process("beam").mark("function-return")
38 | {
39 | printf("pid %s return %s depth %d\n",
40 | user_string($arg1), user_string($arg2), $arg3);
41 | }
42 |
43 | probe process("beam").mark("bif-entry")
44 | {
45 | printf("pid %s BIF entry mfa %s\n", user_string($arg1), user_string($arg2));
46 | }
47 |
48 | probe process("beam").mark("bif-return")
49 | {
50 | printf("pid %s BIF return mfa %s\n", user_string($arg1), user_string($arg2));
51 | }
52 |
53 | probe process("beam").mark("nif-entry")
54 | {
55 | printf("pid %s NIF entry mfa %s\n", user_string($arg1), user_string($arg2));
56 | }
57 |
58 | probe process("beam").mark("nif-return")
59 | {
60 | printf("pid %s NIF return mfa %s\n", user_string($arg1), user_string($arg2));
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/garbage-collection.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/garbage-collection.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::gc_major-start
22 | {
23 | printf("GC major start pid %s need %d words\n", copyinstr(arg0), arg1);
24 | }
25 |
26 | erlang*:::gc_minor-start
27 | {
28 | printf("GC minor start pid %s need %d words\n", copyinstr(arg0), arg1);
29 | }
30 |
31 | erlang*:::gc_major-end
32 | {
33 | printf("GC major end pid %s reclaimed %d words\n", copyinstr(arg0), arg1);
34 | }
35 |
36 | erlang*:::gc_minor-start
37 | {
38 | printf("GC minor end pid %s reclaimed %d words\n", copyinstr(arg0), arg1);
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/garbage-collection.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("beam").mark("gc_major-start")
32 | {
33 | printf("GC major start pid %s need %d words\n", user_string($arg1), $arg2);
34 | }
35 |
36 | probe process("beam").mark("gc_minor-start")
37 | {
38 | printf("GC minor start pid %s need %d words\n", user_string($arg1), $arg2);
39 | }
40 |
41 | probe process("beam").mark("gc_major-end")
42 | {
43 | printf("GC major end pid %s reclaimed %d words\n", user_string($arg1), $arg2);
44 | }
45 |
46 | probe process("beam").mark("gc_minor-start")
47 | {
48 | printf("GC minor end pid %s reclaimed %d words\n", user_string($arg1), $arg2);
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/memory1.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/memory1.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::copy-struct
22 | {
23 | printf("copy_struct %d bytes\n", arg0);
24 | }
25 |
26 | erlang*:::copy-object
27 | {
28 | printf("copy_object pid %s %d bytes\n", copyinstr(arg0), arg1);
29 | }
30 |
31 | erlang*:::process-heap_grow
32 | {
33 | printf("proc heap grow pid %s %d -> %d bytes\n", copyinstr(arg0),
34 | arg1, arg2);
35 | }
36 |
37 | erlang*:::process-heap_shrink
38 | {
39 | printf("proc heap shrink pid %s %d -> %d bytes\n", copyinstr(arg0),
40 | arg1, arg2);
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/memory1.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("beam").mark("copy-struct")
32 | {
33 | printf("copy_struct %d bytes\n", $arg1);
34 | }
35 |
36 | probe process("beam").mark("copy-object")
37 | {
38 | printf("copy_object pid %s %d bytes\n", user_string($arg1), $arg2);
39 | }
40 |
41 | probe process("beam").mark("process-heap_grow")
42 | {
43 | printf("proc heap grow pid %s %d -> %d bytes\n", user_string($arg1),
44 | $arg2, $arg3);
45 | }
46 |
47 | probe process("beam").mark("process-heap_shrink")
48 | {
49 | printf("proc heap shrink pid %s %d -> %d bytes\n", user_string($arg1),
50 | $arg2, $arg3);
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/messages.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/messages.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | BEGIN
22 | {
23 | printf("\n");
24 | printf("NOTE: message-queue message size 4294967295 means an external\n");
25 | printf(" message that the code isn't smart enough to determine\n");
26 | printf(" the actual size.\n");
27 | printf("\n");
28 | }
29 |
30 | erlang*:::message-send
31 | /arg3 == 0 && arg4 == 0 && arg5 == 0/
32 | {
33 | printf("send: %s -> %s: %d words\n",
34 | copyinstr(arg0), copyinstr(arg1), arg2);
35 | }
36 |
37 | erlang*:::message-send
38 | /arg3 != 0 || arg4 != 0 || arg5 != 0/
39 | {
40 | printf("send: %s label %d token {%d,%d} -> %s: %d words\n",
41 | copyinstr(arg0),
42 | arg3, arg4, arg5,
43 | copyinstr(arg1), arg2);
44 | }
45 |
46 | /*
47 | * TODO:
48 | * Weird, on my OS X box, beam says arg6 = 0 but this script says 4294967296.
49 | */
50 |
51 | erlang*:::message-send-remote
52 | /arg4 == 0 && arg5 == 0 && (arg6 == 0 || arg6 >= 4294967296)/
53 | {
54 | printf("send : %s -> %s %s: %d words\n",
55 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3);
56 | }
57 |
58 | erlang*:::message-send-remote
59 | /arg4 != 0 || arg5 != 0 || arg6 < 4294967296/
60 | {
61 | printf("send : %s label %d token {%d,%d} -> %s %s: %d words\n",
62 | copyinstr(arg0),
63 | arg4, arg5, arg6,
64 | copyinstr(arg1), copyinstr(arg2), arg3);
65 | }
66 |
67 | erlang*:::message-queued
68 | /arg3 == 0 && arg4 == 0 && arg5 == 0/
69 | {
70 | printf("queued: %s: %d words, queue len %d\n", copyinstr(arg0), arg1, arg2);
71 | }
72 |
73 | erlang*:::message-queued
74 | /arg3 != 0 || arg4 != 0 || arg5 != 0/
75 | {
76 | printf("queued: %s label %d token {%d,%d}: %d words, queue len %d\n",
77 | copyinstr(arg0), arg3, arg4, arg5,
78 | arg1, arg2);
79 | }
80 |
81 | erlang*:::message-receive
82 | /arg3 == 0 && arg4 == 0 && arg5 == 0/
83 | {
84 | printf("receive: %s: %d words, queue len %d\n",
85 | copyinstr(arg0), arg1, arg2);
86 | }
87 |
88 | erlang*:::message-receive
89 | /arg3 != 0 || arg4 != 0 || arg5 != 0/
90 | {
91 | printf("receive: %s label %d token {%d,%d}: %d words, queue len %d\n",
92 | copyinstr(arg0), arg3, arg4, arg5,
93 | arg1, arg2);
94 | }
95 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/messages.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe begin
32 | {
33 | printf("\n");
34 | printf("NOTE: message-queue message size 4294967295 means an external\n");
35 | printf(" message that the code isn't smart enough to determine\n");
36 | printf(" the actual size.\n");
37 | printf("\n");
38 | }
39 |
40 | probe process("beam").mark("message-send")
41 | {
42 | if ($arg4 == 0 && $arg5 == 0 && $arg6 == 0) {
43 | printf("send: %s -> %s: %d words\n",
44 | user_string($arg1), user_string($arg2), $arg3);
45 | } else {
46 | printf("send: %s label %d token {%d,%d} -> %s: %d words\n",
47 | user_string($arg1),
48 | $arg4, $arg5, $arg6,
49 | user_string($arg2), $arg3);
50 | }
51 | }
52 |
53 | probe process("beam").mark("message-send-remote")
54 | {
55 | if ($arg5 == 0 && $arg6 == 0 && $arg7 == 0) {
56 | printf("send : %s -> %s %s: %d words\n",
57 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4);
58 | } else {
59 | printf("send : %s label %d token {%d,%d} -> %s %s: %d words\n",
60 | user_string($arg1),
61 | $arg5, $arg6, $arg7,
62 | user_string($arg2), user_string($arg3), $arg4);
63 | }
64 | }
65 |
66 | probe process("beam").mark("message-queued")
67 | {
68 | if ($arg4 == 0 && $arg5 == 0 && $arg6 == 0) {
69 | printf("queued: %s: %d words, queue len %d\n", user_string($arg1), $arg2, $arg3);
70 | } else {
71 | printf("queued: %s label %d token {%d,%d}: %d words, queue len %d\n",
72 | user_string($arg1), $arg4, $arg5, $arg6,
73 | $arg2, $arg3);
74 | }
75 | }
76 |
77 | probe process("beam").mark("message-receive")
78 | {
79 | if ($arg4 == 0 && $arg5 == 0 && $arg6 == 0) {
80 | printf("receive: %s: %d words, queue len %d\n",
81 | user_string($arg1), $arg2, $arg3);
82 | } else {
83 | printf("receive: %s label %d token {%d,%d}: %d words, queue len %d\n",
84 | user_string($arg1), $arg4, $arg5, $arg6,
85 | $arg2, $arg3);
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/port1.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/port1.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | BEGIN
22 | {
23 | driver_map["tcp_inet", 1] = "OPEN";
24 | driver_map["tcp_inet", 2] = "CLOSE";
25 | driver_map["tcp_inet", 3] = "CONNECT";
26 | driver_map["tcp_inet", 4] = "PEER";
27 | driver_map["tcp_inet", 5] = "NAME";
28 | driver_map["tcp_inet", 6] = "BIND";
29 | driver_map["tcp_inet", 7] = "SETOPTS";
30 | driver_map["tcp_inet", 8] = "GETOPTS";
31 | driver_map["tcp_inet", 11] = "GETSTAT";
32 | driver_map["tcp_inet", 12] = "GETHOSTNAME";
33 | driver_map["tcp_inet", 13] = "FDOPEN";
34 | driver_map["tcp_inet", 14] = "GETFD";
35 | driver_map["tcp_inet", 15] = "GETTYPE";
36 | driver_map["tcp_inet", 16] = "GETSTATUS";
37 | driver_map["tcp_inet", 17] = "GETSERVBYNAME";
38 | driver_map["tcp_inet", 18] = "GETSERVBYPORT";
39 | driver_map["tcp_inet", 19] = "SETNAME";
40 | driver_map["tcp_inet", 20] = "SETPEER";
41 | driver_map["tcp_inet", 21] = "GETIFLIST";
42 | driver_map["tcp_inet", 22] = "IFGET";
43 | driver_map["tcp_inet", 23] = "IFSET";
44 | driver_map["tcp_inet", 24] = "SUBSCRIBE";
45 | driver_map["tcp_inet", 25] = "GETIFADDRS";
46 | driver_map["tcp_inet", 40] = "ACCEPT";
47 | driver_map["tcp_inet", 41] = "LISTEN";
48 | driver_map["tcp_inet", 42] = "RECV";
49 | driver_map["tcp_inet", 43] = "UNRECV";
50 | driver_map["tcp_inet", 44] = "SHUTDOWN";
51 | driver_map["tcp_inet", 60] = "RECV";
52 | driver_map["tcp_inet", 61] = "LISTEN";
53 | driver_map["tcp_inet", 62] = "BINDX";
54 | /* No looping constructs, so repeat for udp_inet */
55 | driver_map["udp_inet", 1] = "OPEN";
56 | driver_map["udp_inet", 2] = "CLOSE";
57 | driver_map["udp_inet", 3] = "CONNECT";
58 | driver_map["udp_inet", 4] = "PEER";
59 | driver_map["udp_inet", 5] = "NAME";
60 | driver_map["udp_inet", 6] = "BIND";
61 | driver_map["udp_inet", 7] = "SETOPTS";
62 | driver_map["udp_inet", 8] = "GETOPTS";
63 | driver_map["udp_inet", 11] = "GETSTAT";
64 | driver_map["udp_inet", 12] = "GETHOSTNAME";
65 | driver_map["udp_inet", 13] = "FDOPEN";
66 | driver_map["udp_inet", 14] = "GETFD";
67 | driver_map["udp_inet", 15] = "GETTYPE";
68 | driver_map["udp_inet", 16] = "GETSTATUS";
69 | driver_map["udp_inet", 17] = "GETSERVBYNAME";
70 | driver_map["udp_inet", 18] = "GETSERVBYPORT";
71 | driver_map["udp_inet", 19] = "SETNAME";
72 | driver_map["udp_inet", 20] = "SETPEER";
73 | driver_map["udp_inet", 21] = "GETIFLIST";
74 | driver_map["udp_inet", 22] = "IFGET";
75 | driver_map["udp_inet", 23] = "IFSET";
76 | driver_map["udp_inet", 24] = "SUBSCRIBE";
77 | driver_map["udp_inet", 25] = "GETIFADDRS";
78 | driver_map["udp_inet", 40] = "ACCEPT";
79 | driver_map["udp_inet", 41] = "LISTEN";
80 | driver_map["udp_inet", 42] = "RECV";
81 | driver_map["udp_inet", 43] = "UNRECV";
82 | driver_map["udp_inet", 44] = "SHUTDOWN";
83 | driver_map["udp_inet", 60] = "RECV";
84 | driver_map["udp_inet", 61] = "LISTEN";
85 | driver_map["udp_inet", 62] = "BINDX";
86 | }
87 |
88 | erlang*:::port-open
89 | {
90 | printf("port open pid %s port name %s port %s\n",
91 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
92 | }
93 |
94 | erlang*:::port-command
95 | {
96 | printf("port command pid %s port %s port name %s command type %s\n",
97 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3));
98 | }
99 |
100 | erlang*:::port-control
101 | {
102 | /* http://dtrace.org/blogs/brendan/2011/11/25/dtrace-variable-types/ */
103 | this->cmd = driver_map[copyinstr(arg2), arg3];
104 | this->cmd_str = (this->cmd == 0) ? "unknown" : this->cmd;
105 | printf("port control pid %s port %s port name %s command %d %s\n",
106 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), arg3,
107 | this->cmd_str);
108 | }
109 |
110 | /* port-exit is fired as a result of port_close() or exit signal */
111 |
112 | erlang*:::port-exit
113 | {
114 | printf("port exit pid %s port %s port name %s reason %s\n",
115 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3));
116 | }
117 |
118 | erlang*:::port-connect
119 | {
120 | printf("port connect pid %s port %s port name %s new pid %s\n",
121 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3));
122 | }
123 |
124 | erlang*:::port-busy
125 | {
126 | printf("port busy %s\n", copyinstr(arg0));
127 | }
128 |
129 | erlang*:::port-not_busy
130 | {
131 | printf("port not busy %s\n", copyinstr(arg0));
132 | }
133 |
134 | erlang*:::aio_pool-add
135 | {
136 | printf("async I/O pool add thread %d queue len %d\n", arg0, arg1);
137 | }
138 |
139 | erlang*:::aio_pool-get
140 | {
141 | printf("async I/O pool get thread %d queue len %d\n", arg0, arg1);
142 | }
143 |
144 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/port1.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe begin
32 | {
33 | driver_map["tcp_inet", 1] = "OPEN";
34 | driver_map["tcp_inet", 2] = "CLOSE";
35 | driver_map["tcp_inet", 3] = "CONNECT";
36 | driver_map["tcp_inet", 4] = "PEER";
37 | driver_map["tcp_inet", 5] = "NAME";
38 | driver_map["tcp_inet", 6] = "BIND";
39 | driver_map["tcp_inet", 7] = "SETOPTS";
40 | driver_map["tcp_inet", 8] = "GETOPTS";
41 | driver_map["tcp_inet", 11] = "GETSTAT";
42 | driver_map["tcp_inet", 12] = "GETHOSTNAME";
43 | driver_map["tcp_inet", 13] = "FDOPEN";
44 | driver_map["tcp_inet", 14] = "GETFD";
45 | driver_map["tcp_inet", 15] = "GETTYPE";
46 | driver_map["tcp_inet", 16] = "GETSTATUS";
47 | driver_map["tcp_inet", 17] = "GETSERVBYNAME";
48 | driver_map["tcp_inet", 18] = "GETSERVBYPORT";
49 | driver_map["tcp_inet", 19] = "SETNAME";
50 | driver_map["tcp_inet", 20] = "SETPEER";
51 | driver_map["tcp_inet", 21] = "GETIFLIST";
52 | driver_map["tcp_inet", 22] = "IFGET";
53 | driver_map["tcp_inet", 23] = "IFSET";
54 | driver_map["tcp_inet", 24] = "SUBSCRIBE";
55 | driver_map["tcp_inet", 25] = "GETIFADDRS";
56 | driver_map["tcp_inet", 40] = "ACCEPT";
57 | driver_map["tcp_inet", 41] = "LISTEN";
58 | driver_map["tcp_inet", 42] = "RECV";
59 | driver_map["tcp_inet", 43] = "UNRECV";
60 | driver_map["tcp_inet", 44] = "SHUTDOWN";
61 | driver_map["tcp_inet", 60] = "RECV";
62 | driver_map["tcp_inet", 61] = "LISTEN";
63 | driver_map["tcp_inet", 62] = "BINDX";
64 | /* No looping constructs, so repeat for udp_inet */
65 | driver_map["udp_inet", 1] = "OPEN";
66 | driver_map["udp_inet", 2] = "CLOSE";
67 | driver_map["udp_inet", 3] = "CONNECT";
68 | driver_map["udp_inet", 4] = "PEER";
69 | driver_map["udp_inet", 5] = "NAME";
70 | driver_map["udp_inet", 6] = "BIND";
71 | driver_map["udp_inet", 7] = "SETOPTS";
72 | driver_map["udp_inet", 8] = "GETOPTS";
73 | driver_map["udp_inet", 11] = "GETSTAT";
74 | driver_map["udp_inet", 12] = "GETHOSTNAME";
75 | driver_map["udp_inet", 13] = "FDOPEN";
76 | driver_map["udp_inet", 14] = "GETFD";
77 | driver_map["udp_inet", 15] = "GETTYPE";
78 | driver_map["udp_inet", 16] = "GETSTATUS";
79 | driver_map["udp_inet", 17] = "GETSERVBYNAME";
80 | driver_map["udp_inet", 18] = "GETSERVBYPORT";
81 | driver_map["udp_inet", 19] = "SETNAME";
82 | driver_map["udp_inet", 20] = "SETPEER";
83 | driver_map["udp_inet", 21] = "GETIFLIST";
84 | driver_map["udp_inet", 22] = "IFGET";
85 | driver_map["udp_inet", 23] = "IFSET";
86 | driver_map["udp_inet", 24] = "SUBSCRIBE";
87 | driver_map["udp_inet", 25] = "GETIFADDRS";
88 | driver_map["udp_inet", 40] = "ACCEPT";
89 | driver_map["udp_inet", 41] = "LISTEN";
90 | driver_map["udp_inet", 42] = "RECV";
91 | driver_map["udp_inet", 43] = "UNRECV";
92 | driver_map["udp_inet", 44] = "SHUTDOWN";
93 | driver_map["udp_inet", 60] = "RECV";
94 | driver_map["udp_inet", 61] = "LISTEN";
95 | driver_map["udp_inet", 62] = "BINDX";
96 | }
97 |
98 | probe process("beam").mark("port-open")
99 | {
100 | printf("port open pid %s port name %s port %s\n",
101 | user_string($arg1), user_string($arg2), user_string($arg3));
102 | }
103 |
104 | probe process("beam").mark("port-command")
105 | {
106 | printf("port command pid %s port %s port name %s command type %s\n",
107 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
108 | }
109 |
110 | probe process("beam").mark("port-control")
111 | {
112 | cmd = driver_map[user_string($arg3), $arg4];
113 | cmd_str = (cmd == "") ? "unknown" : cmd;
114 | printf("port control pid %s port %s port name %s command %d %s\n",
115 | user_string($arg1), user_string($arg2), user_string($arg3), $arg4, cmd_str);
116 | }
117 |
118 | /* port-exit is fired as a result of port_close() or exit signal */
119 |
120 | probe process("beam").mark("port-exit")
121 | {
122 | printf("port exit pid %s port %s port name %s reason %s\n",
123 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
124 | }
125 |
126 | probe process("beam").mark("port-connect")
127 | {
128 | printf("port connect pid %s port %s port name %s new pid %s\n",
129 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
130 | }
131 |
132 | probe process("beam").mark("port-busy")
133 | {
134 | printf("port busy %s\n", user_string($arg1));
135 | }
136 |
137 | probe process("beam").mark("port-not_busy")
138 | {
139 | printf("port not busy %s\n", user_string($arg1));
140 | }
141 |
142 | probe process("beam").mark("aio_pool-add")
143 | {
144 | printf("async I/O pool add thread %d queue len %d\n", $arg1, $arg2);
145 | }
146 |
147 | probe process("beam").mark("aio_pool-get")
148 | {
149 | printf("async I/O pool get thread %d queue len %d\n", $arg1, $arg2);
150 | }
151 |
152 | global driver_map;
--------------------------------------------------------------------------------
/erlang-dtrace-examples/process-scheduling.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/process-scheduling.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::process-scheduled
22 | {
23 | printf(" Schedule pid %s mfa %s\n", copyinstr(arg0), copyinstr(arg1));
24 | }
25 |
26 | erlang*:::process-unscheduled
27 | {
28 | printf("Unschedule pid %s\n", copyinstr(arg0));
29 | }
30 |
31 | erlang*:::process-hibernate
32 | {
33 | printf(" Hibernate pid %s resume mfa %s\n",
34 | copyinstr(arg0), copyinstr(arg1));
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/process-scheduling.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("beam").mark("process-scheduled")
32 | {
33 | printf(" Schedule pid %s mfa %s\n", user_string($arg1), user_string($arg2));
34 | }
35 |
36 | probe process("beam").mark("process-unscheduled")
37 | {
38 | printf("Unschedule pid %s\n", user_string($arg1));
39 | }
40 |
41 | probe process("beam").mark("process-hibernate")
42 | {
43 | printf(" Hibernate pid %s resume mfa %s\n",
44 | user_string($arg1), user_string($arg2));
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/spawn-exit.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/spawn-exit.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::process-spawn
22 | {
23 | printf("pid %s mfa %s\n", copyinstr(arg0), copyinstr(arg1));
24 | }
25 |
26 | erlang*:::process-exit
27 | {
28 | printf("pid %s reason %s\n", copyinstr(arg0), copyinstr(arg1));
29 | }
30 |
31 | erlang*:::process-exit_signal
32 | {
33 | printf("sender %s -> pid %s reason %s\n",
34 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2));
35 | }
36 |
37 | erlang*:::process-exit_signal-remote
38 | {
39 | printf("sender %s -> node %s pid %s reason %s\n",
40 | copyinstr(arg0), copyinstr(arg1), copyinstr(arg2), copyinstr(arg3));
41 | }
42 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/spawn-exit.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("beam").mark("process-spawn")
32 | {
33 | printf("pid %s mfa %s\n", user_string($arg1), user_string($arg2));
34 | }
35 |
36 | probe process("beam").mark("process-exit")
37 | {
38 | printf("pid %s reason %s\n", user_string($arg1), user_string($arg2));
39 | }
40 |
41 | probe process("beam").mark("process-exit_signal")
42 | {
43 | printf("sender %s -> pid %s reason %s\n",
44 | user_string($arg1), user_string($arg2), user_string($arg3));
45 | }
46 |
47 | probe process("beam").mark("process-exit_signal-remote")
48 | {
49 | printf("sender %s -> node %s pid %s reason %s\n",
50 | user_string($arg1), user_string($arg2), user_string($arg3), user_string($arg4));
51 | }
52 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/user-probe.d:
--------------------------------------------------------------------------------
1 | /* example usage: dtrace -q -s /path/to/user-probe.d */
2 | /*
3 | * %CopyrightBegin%
4 | *
5 | * Copyright Scott Lystig Fritchie 2011. All Rights Reserved.
6 | *
7 | * The contents of this file are subject to the Erlang Public License,
8 | * Version 1.1, (the "License"); you may not use this file except in
9 | * compliance with the License. You should have received a copy of the
10 | * Erlang Public License along with this software. If not, it can be
11 | * retrieved online at http://www.erlang.org/.
12 | *
13 | * Software distributed under the License is distributed on an "AS IS"
14 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15 | * the License for the specific language governing rights and limitations
16 | * under the License.
17 | *
18 | * %CopyrightEnd%
19 | */
20 |
21 | erlang*:::user_trace-s1
22 | {
23 | printf("%s\n", copyinstr(arg0));
24 | }
25 |
26 | erlang*:::user_trace-i4s4
27 | {
28 | printf("%s %s %d %d %d %d '%s' '%s' '%s' '%s'\n",
29 | copyinstr(arg0),
30 | arg1 == NULL ? "" : copyinstr(arg1),
31 | arg2, arg3, arg4, arg5,
32 | arg6 == NULL ? "" : copyinstr(arg6),
33 | arg7 == NULL ? "" : copyinstr(arg7),
34 | arg8 == NULL ? "" : copyinstr(arg8),
35 | arg9 == NULL ? "" : copyinstr(arg9));
36 | }
37 |
--------------------------------------------------------------------------------
/erlang-dtrace-examples/user-probe.systemtap:
--------------------------------------------------------------------------------
1 | /*
2 | * %CopyrightBegin%
3 | *
4 | * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011. All Rights Reserved.
5 | *
6 | * The contents of this file are subject to the Erlang Public License,
7 | * Version 1.1, (the "License"); you may not use this file except in
8 | * compliance with the License. You should have received a copy of the
9 | * Erlang Public License along with this software. If not, it can be
10 | * retrieved online at http://www.erlang.org/.
11 | *
12 | * Software distributed under the License is distributed on an "AS IS"
13 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 | * the License for the specific language governing rights and limitations
15 | * under the License.
16 | *
17 | * %CopyrightEnd%
18 | */
19 | /*
20 | * Note: This file assumes that you're using the non-SMP-enabled Erlang
21 | * virtual machine, "beam". The SMP-enabled VM is called "beam.smp".
22 | * Note that other variations of the virtual machine also have
23 | * different names, e.g. the debug build of the SMP-enabled VM
24 | * is "beam.debug.smp".
25 | *
26 | * To use a different virtual machine, replace each instance of
27 | * "beam" with "beam.smp" or the VM name appropriate to your
28 | * environment.
29 | */
30 |
31 | probe process("dtrace.so").mark("user_trace-s1")
32 | {
33 | printf("%s\n", user_string($arg1));
34 | }
35 |
36 | probe process("dtrace.so").mark("user_trace-i4s4")
37 | {
38 | printf("%s %s %d %d %d %d '%s' '%s' '%s' '%s'\n",
39 | user_string($arg1),
40 | $arg2 == NULL ? "" : user_string($arg2),
41 | $arg3, $arg4, $arg5, $arg6,
42 | $arg7 == NULL ? "" : user_string($arg7),
43 | $arg8 == NULL ? "" : user_string($arg8),
44 | $arg9 == NULL ? "" : user_string($arg9),
45 | $arg9 == NULL ? "" : user_string($arg9));
46 | }
47 |
--------------------------------------------------------------------------------
/riak-1.0.2+dtrace-osx-lion.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/argv0/dtrace-erlang-bashochat-12142011/929bedaa9c41734d01bda0a5e09d3ea40309b213/riak-1.0.2+dtrace-osx-lion.tar.bz2
--------------------------------------------------------------------------------
/slides/core/deck.core.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100%;
3 | }
4 |
5 | .deck-container {
6 | position: relative;
7 | height: 100%;
8 | width: 70%;
9 | margin: 0 auto;
10 | padding: 0 48px;
11 | font-size: 16px;
12 | line-height: 1.25;
13 | overflow: hidden;
14 | /* Resets and base styles from HTML5 Boilerplate */
15 | /* End HTML5 Boilerplate adaptations */
16 | }
17 | .js .deck-container {
18 | visibility: hidden;
19 | }
20 | .ready .deck-container {
21 | visibility: visible;
22 | }
23 | .touch .deck-container {
24 | -webkit-text-size-adjust: none;
25 | }
26 | .deck-container div, .deck-container span, .deck-container object, .deck-container iframe,
27 | .deck-container h1, .deck-container h2, .deck-container h3, .deck-container h4, .deck-container h5, .deck-container h6, .deck-container p, .deck-container blockquote, .deck-container pre,
28 | .deck-container abbr, .deck-container address, .deck-container cite, .deck-container code, .deck-container del, .deck-container dfn, .deck-container em, .deck-container img, .deck-container ins, .deck-container kbd, .deck-container q, .deck-container samp,
29 | .deck-container small, .deck-container strong, .deck-container sub, .deck-container sup, .deck-container var, .deck-container b, .deck-container i, .deck-container dl, .deck-container dt, .deck-container dd, .deck-container ol, .deck-container ul, .deck-container li,
30 | .deck-container fieldset, .deck-container form, .deck-container label, .deck-container legend,
31 | .deck-container table, .deck-container caption, .deck-container tbody, .deck-container tfoot, .deck-container thead, .deck-container tr, .deck-container th, .deck-container td,
32 | .deck-container article, .deck-container aside, .deck-container canvas, .deck-container details, .deck-container figcaption, .deck-container figure,
33 | .deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section, .deck-container summary,
34 | .deck-container time, .deck-container mark, .deck-container audio, .deck-container video {
35 | margin: 0;
36 | padding: 0;
37 | border: 0;
38 | font-size: 100%;
39 | font: inherit;
40 | vertical-align: baseline;
41 | }
42 | .deck-container article, .deck-container aside, .deck-container details, .deck-container figcaption, .deck-container figure,
43 | .deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section {
44 | display: block;
45 | }
46 | .deck-container blockquote, .deck-container q {
47 | quotes: none;
48 | }
49 | .deck-container blockquote:before, .deck-container blockquote:after, .deck-container q:before, .deck-container q:after {
50 | content: "";
51 | content: none;
52 | }
53 | .deck-container ins {
54 | background-color: #ff9;
55 | color: #000;
56 | text-decoration: none;
57 | }
58 | .deck-container mark {
59 | background-color: #ff9;
60 | color: #000;
61 | font-style: italic;
62 | font-weight: bold;
63 | }
64 | .deck-container del {
65 | text-decoration: line-through;
66 | }
67 | .deck-container abbr[title], .deck-container dfn[title] {
68 | border-bottom: 1px dotted;
69 | cursor: help;
70 | }
71 | .deck-container table {
72 | border-collapse: collapse;
73 | border-spacing: 0;
74 | }
75 | .deck-container hr {
76 | display: block;
77 | height: 1px;
78 | border: 0;
79 | border-top: 1px solid #ccc;
80 | margin: 1em 0;
81 | padding: 0;
82 | }
83 | .deck-container input, .deck-container select {
84 | vertical-align: middle;
85 | }
86 | .deck-container select, .deck-container input, .deck-container textarea, .deck-container button {
87 | font: 99% sans-serif;
88 | }
89 | .deck-container pre, .deck-container code, .deck-container kbd, .deck-container samp {
90 | font-family: monospace, sans-serif;
91 | }
92 | .deck-container a {
93 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
94 | }
95 | .deck-container a:hover, .deck-container a:active {
96 | outline: none;
97 | }
98 | .deck-container ul, .deck-container ol {
99 | margin-left: 2em;
100 | vertical-align: top;
101 | }
102 | .deck-container ol {
103 | list-style-type: decimal;
104 | }
105 | .deck-container nav ul, .deck-container nav li {
106 | margin: 0;
107 | list-style: none;
108 | list-style-image: none;
109 | }
110 | .deck-container small {
111 | font-size: 85%;
112 | }
113 | .deck-container strong, .deck-container th {
114 | font-weight: bold;
115 | }
116 | .deck-container td {
117 | vertical-align: top;
118 | }
119 | .deck-container sub, .deck-container sup {
120 | font-size: 75%;
121 | line-height: 0;
122 | position: relative;
123 | }
124 | .deck-container sup {
125 | top: -0.5em;
126 | }
127 | .deck-container sub {
128 | bottom: -0.25em;
129 | }
130 | .deck-container textarea {
131 | overflow: auto;
132 | }
133 | .ie6 .deck-container legend, .ie7 .deck-container legend {
134 | margin-left: -7px;
135 | }
136 | .deck-container input[type="radio"] {
137 | vertical-align: text-bottom;
138 | }
139 | .deck-container input[type="checkbox"] {
140 | vertical-align: bottom;
141 | }
142 | .ie7 .deck-container input[type="checkbox"] {
143 | vertical-align: baseline;
144 | }
145 | .ie6 .deck-container input {
146 | vertical-align: text-bottom;
147 | }
148 | .deck-container label, .deck-container input[type="button"], .deck-container input[type="submit"], .deck-container input[type="image"], .deck-container button {
149 | cursor: pointer;
150 | }
151 | .deck-container button, .deck-container input, .deck-container select, .deck-container textarea {
152 | margin: 0;
153 | }
154 | .deck-container input:invalid, .deck-container textarea:invalid {
155 | border-radius: 1px;
156 | -moz-box-shadow: 0px 0px 5px red;
157 | -webkit-box-shadow: 0px 0px 5px red;
158 | box-shadow: 0px 0px 5px red;
159 | }
160 | .deck-container input:invalid .no-boxshadow, .deck-container textarea:invalid .no-boxshadow {
161 | background-color: #f0dddd;
162 | }
163 | .deck-container button {
164 | width: auto;
165 | overflow: visible;
166 | }
167 | .ie7 .deck-container img {
168 | -ms-interpolation-mode: bicubic;
169 | }
170 | .deck-container, .deck-container select, .deck-container input, .deck-container textarea {
171 | color: #444;
172 | }
173 | .deck-container a {
174 | color: #607890;
175 | }
176 | .deck-container a:hover, .deck-container a:focus {
177 | color: #036;
178 | }
179 | .deck-container a:link {
180 | -webkit-tap-highlight-color: #fff;
181 | }
182 | .deck-container.deck-loading {
183 | display: none;
184 | }
185 |
186 | .slide {
187 | width: auto;
188 | min-height: 100%;
189 | position: relative;
190 | }
191 | .slide h1 {
192 | font-size: 4.5em;
193 | }
194 | .slide h1, .slide .vcenter {
195 | font-weight: bold;
196 | text-align: center;
197 | padding-top: 1em;
198 | max-height: 100%;
199 | }
200 | .csstransforms .slide h1, .csstransforms .slide .vcenter {
201 | padding: 0 48px;
202 | position: absolute;
203 | left: 0;
204 | right: 0;
205 | top: 50%;
206 | -webkit-transform: translate(0, -50%);
207 | -moz-transform: translate(0, -50%);
208 | -ms-transform: translate(0, -50%);
209 | -o-transform: translate(0, -50%);
210 | transform: translate(0, -50%);
211 | }
212 | .slide .vcenter h1 {
213 | position: relative;
214 | top: auto;
215 | padding: 0;
216 | -webkit-transform: none;
217 | -moz-transform: none;
218 | -ms-transform: none;
219 | -o-transform: none;
220 | transform: none;
221 | }
222 | .slide h2 {
223 | font-size: 2.25em;
224 | font-weight: bold;
225 | padding-top: .5em;
226 | margin: 0 0 .66666em 0;
227 | border-bottom: 3px solid #888;
228 | }
229 | .slide h3 {
230 | font-size: 1.4375em;
231 | font-weight: bold;
232 | margin-bottom: .30435em;
233 | }
234 | .slide h4 {
235 | font-size: 1.25em;
236 | font-weight: bold;
237 | margin-bottom: .25em;
238 | }
239 | .slide h5 {
240 | font-size: 1.125em;
241 | font-weight: bold;
242 | margin-bottom: .2222em;
243 | }
244 | .slide h6 {
245 | font-size: 1em;
246 | font-weight: bold;
247 | }
248 | .slide img, .slide iframe, .slide video {
249 | display: block;
250 | max-width: 100%;
251 | }
252 | .slide video, .slide iframe, .slide img {
253 | display: block;
254 | margin: 0 auto;
255 | }
256 | .slide p, .slide blockquote, .slide iframe, .slide img, .slide ul, .slide ol, .slide pre, .slide video {
257 | margin-bottom: 1em;
258 | }
259 | .slide pre {
260 | white-space: pre;
261 | white-space: pre-wrap;
262 | word-wrap: break-word;
263 | padding: 1em;
264 | border: 1px solid #888;
265 | }
266 | .slide em {
267 | font-style: italic;
268 | }
269 | .slide li {
270 | padding: .25em 0;
271 | vertical-align: middle;
272 | }
273 |
274 | .deck-before, .deck-previous, .deck-next, .deck-after {
275 | position: absolute;
276 | left: -999em;
277 | top: -999em;
278 | }
279 |
280 | .deck-current {
281 | z-index: 2;
282 | }
283 |
284 | .slide .slide {
285 | visibility: hidden;
286 | position: static;
287 | min-height: 0;
288 | }
289 |
290 | .deck-child-current {
291 | position: static;
292 | z-index: 2;
293 | }
294 | .deck-child-current .slide {
295 | visibility: hidden;
296 | }
297 | .deck-child-current .deck-previous, .deck-child-current .deck-before, .deck-child-current .deck-current {
298 | visibility: visible;
299 | }
300 |
301 | body.deck-container {
302 | overflow: visible;
303 | }
304 |
305 | @media screen and (max-device-width: 480px) {
306 | /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
307 | }
308 | @media print {
309 | * {
310 | background: transparent !important;
311 | color: black !important;
312 | text-shadow: none !important;
313 | filter: none !important;
314 | -ms-filter: none !important;
315 | -webkit-box-reflect: none !important;
316 | -moz-box-reflect: none !important;
317 | -webkit-box-shadow: none !important;
318 | -moz-box-shadow: none !important;
319 | box-shadow: none !important;
320 | }
321 | * :before, * :after {
322 | display: none !important;
323 | }
324 |
325 | a, a:visited {
326 | color: #444 !important;
327 | text-decoration: underline;
328 | }
329 |
330 | a[href]:after {
331 | content: " (" attr(href) ")";
332 | }
333 |
334 | abbr[title]:after {
335 | content: " (" attr(title) ")";
336 | }
337 |
338 | .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
339 | content: "";
340 | }
341 |
342 | pre, blockquote {
343 | border: 1px solid #999;
344 | page-break-inside: avoid;
345 | }
346 |
347 | thead {
348 | display: table-header-group;
349 | }
350 |
351 | tr, img {
352 | page-break-inside: avoid;
353 | }
354 |
355 | @page {
356 | margin: 0.5cm;
357 | }
358 |
359 | p, h2, h3 {
360 | orphans: 3;
361 | widows: 3;
362 | }
363 |
364 | h2, h3 {
365 | page-break-after: avoid;
366 | }
367 |
368 | .slide {
369 | position: static !important;
370 | visibility: visible !important;
371 | display: block !important;
372 | -webkit-transform: none !important;
373 | -moz-transform: none !important;
374 | -o-transform: none !important;
375 | -ms-transform: none !important;
376 | transform: none !important;
377 | opacity: 1 !important;
378 | }
379 |
380 | h1, .vcenter {
381 | -webkit-transform: none !important;
382 | -moz-transform: none !important;
383 | -o-transform: none !important;
384 | -ms-transform: none !important;
385 | transform: none !important;
386 | padding: 0 !important;
387 | position: static !important;
388 | }
389 |
390 | .deck-container > .slide {
391 | page-break-after: always;
392 | }
393 |
394 | .deck-container {
395 | width: 100% !important;
396 | height: auto !important;
397 | padding: 0 !important;
398 | display: block !important;
399 | }
400 |
401 | script {
402 | display: none;
403 | }
404 | }
405 |
--------------------------------------------------------------------------------
/slides/core/deck.core.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Deck Skeleton
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/slides/core/deck.core.js:
--------------------------------------------------------------------------------
1 | /*!
2 | Deck JS - deck.core
3 | Copyright (c) 2011 Caleb Troughton
4 | Dual licensed under the MIT license and GPL license.
5 | https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6 | https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
7 | */
8 |
9 | /*
10 | The deck.core module provides all the basic functionality for creating and
11 | moving through a deck. It does so by applying classes to indicate the state of
12 | the deck and its slides, allowing CSS to take care of the visual representation
13 | of each state. It also provides methods for navigating the deck and inspecting
14 | its state, as well as basic key bindings for going to the next and previous
15 | slides. More functionality is provided by wholly separate extension modules
16 | that use the API provided by core.
17 | */
18 | (function($, deck, document, undefined) {
19 | var slides, // Array of all the uh, slides...
20 | current, // Array index of the current slide
21 | $container, // Keeping this cached
22 |
23 | events = {
24 | /*
25 | This event fires whenever the current slide changes, whether by way of
26 | next, prev, or go. The callback function is passed two parameters, from
27 | and to, equal to the indices of the old slide and the new slide
28 | respectively. If preventDefault is called on the event within this handler
29 | the slide change does not occur.
30 |
31 | $(document).bind('deck.change', function(event, from, to) {
32 | alert('Moving from slide ' + from + ' to ' + to);
33 | });
34 | */
35 | change: 'deck.change',
36 |
37 | /*
38 | This event fires at the beginning of deck initialization, after the options
39 | are set but before the slides array is created. This event makes a good hook
40 | for preprocessing extensions looking to modify the deck.
41 | */
42 | beforeInitialize: 'deck.beforeInit',
43 |
44 | /*
45 | This event fires at the end of deck initialization. Extensions should
46 | implement any code that relies on user extensible options (key bindings,
47 | element selectors, classes) within a handler for this event. Native
48 | events associated with Deck JS should be scoped under a .deck event
49 | namespace, as with the example below:
50 |
51 | var $d = $(document);
52 | $.deck.defaults.keys.myExtensionKeycode = 70; // 'h'
53 | $d.bind('deck.init', function() {
54 | $d.bind('keydown.deck', function(event) {
55 | if (event.which === $.deck.getOptions().keys.myExtensionKeycode) {
56 | // Rock out
57 | }
58 | });
59 | });
60 | */
61 | initialize: 'deck.init'
62 | },
63 |
64 | options = {},
65 | $d = $(document),
66 |
67 | /*
68 | Internal function. Updates slide and container classes based on which
69 | slide is the current slide.
70 | */
71 | updateStates = function() {
72 | var oc = options.classes,
73 | osc = options.selectors.container,
74 | old = $container.data('onSlide'),
75 | $all = $();
76 |
77 | // Container state
78 | $container.removeClass(oc.onPrefix + old)
79 | .addClass(oc.onPrefix + current)
80 | .data('onSlide', current);
81 |
82 | // Remove and re-add child-current classes for nesting
83 | $('.' + oc.current).parentsUntil(osc).removeClass(oc.childCurrent);
84 | slides[current].parentsUntil(osc).addClass(oc.childCurrent);
85 |
86 | // Remove previous states
87 | $.each(slides, function(i, el) {
88 | $all = $all.add(el);
89 | });
90 | $all.removeClass([
91 | oc.before,
92 | oc.previous,
93 | oc.current,
94 | oc.next,
95 | oc.after
96 | ].join(" "));
97 |
98 | // Add new states back in
99 | slides[current].addClass(oc.current);
100 | if (current > 0) {
101 | slides[current-1].addClass(oc.previous);
102 | }
103 | if (current + 1 < slides.length) {
104 | slides[current+1].addClass(oc.next);
105 | }
106 | if (current > 1) {
107 | $.each(slides.slice(0, current - 1), function(i, el) {
108 | el.addClass(oc.before);
109 | });
110 | }
111 | if (current + 2 < slides.length) {
112 | $.each(slides.slice(current+2), function(i, el) {
113 | el.addClass(oc.after);
114 | });
115 | }
116 | },
117 |
118 | /* Methods exposed in the jQuery.deck namespace */
119 | methods = {
120 |
121 | /*
122 | jQuery.deck(selector, options)
123 |
124 | selector: string | jQuery | array
125 | options: object, optional
126 |
127 | Initializes the deck, using each element matched by selector as a slide.
128 | May also be passed an array of string selectors or jQuery objects, in
129 | which case each selector in the array is considered a slide. The second
130 | parameter is an optional options object which will extend the default
131 | values.
132 |
133 | $.deck('.slide');
134 |
135 | or
136 |
137 | $.deck([
138 | '#first-slide',
139 | '#second-slide',
140 | '#etc'
141 | ]);
142 | */
143 | init: function(elements, opts) {
144 | var startTouch,
145 | tolerance,
146 | esp = function(e) {
147 | e.stopPropagation();
148 | };
149 |
150 | options = $.extend(true, {}, $[deck].defaults, opts);
151 | slides = [];
152 | current = 0;
153 | $container = $(options.selectors.container);
154 | tolerance = options.touch.swipeTolerance;
155 |
156 | // Pre init event for preprocessing hooks
157 | $d.trigger(events.beforeInitialize);
158 |
159 | // Hide the deck while states are being applied to kill transitions
160 | $container.addClass(options.classes.loading);
161 |
162 | // Fill slides array depending on parameter type
163 | if ($.isArray(elements)) {
164 | $.each(elements, function(i, e) {
165 | slides.push($(e));
166 | });
167 | }
168 | else {
169 | $(elements).each(function(i, e) {
170 | slides.push($(e));
171 | });
172 | }
173 |
174 | /* Remove any previous bindings, and rebind key events */
175 | $d.unbind('keydown.deck').bind('keydown.deck', function(e) {
176 | if (e.which === options.keys.next || $.inArray(e.which, options.keys.next) > -1) {
177 | methods.next();
178 | e.preventDefault();
179 | }
180 | else if (e.which === options.keys.previous || $.inArray(e.which, options.keys.previous) > -1) {
181 | methods.prev();
182 | e.preventDefault();
183 | }
184 | });
185 |
186 | /* Bind touch events for swiping between slides on touch devices */
187 | $container.unbind('touchstart.deck').bind('touchstart.deck', function(e) {
188 | if (!startTouch) {
189 | startTouch = $.extend({}, e.originalEvent.targetTouches[0]);
190 | }
191 | })
192 | .unbind('touchmove.deck').bind('touchmove.deck', function(e) {
193 | $.each(e.originalEvent.changedTouches, function(i, t) {
194 | if (startTouch && t.identifier === startTouch.identifier) {
195 | if (t.screenX - startTouch.screenX > tolerance || t.screenY - startTouch.screenY > tolerance) {
196 | $[deck]('prev');
197 | startTouch = undefined;
198 | }
199 | else if (t.screenX - startTouch.screenX < -1 * tolerance || t.screenY - startTouch.screenY < -1 * tolerance) {
200 | $[deck]('next');
201 | startTouch = undefined;
202 | }
203 | return false;
204 | }
205 | });
206 | e.preventDefault();
207 | })
208 | .unbind('touchend.deck').bind('touchend.deck', function(t) {
209 | $.each(t.originalEvent.changedTouches, function(i, t) {
210 | if (startTouch && t.identifier === startTouch.identifier) {
211 | startTouch = undefined;
212 | }
213 | });
214 | })
215 | .scrollLeft(0).scrollTop(0)
216 | /* Stop propagation of key events within editable elements of slides */
217 | .undelegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp)
218 | .delegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp);
219 |
220 | /*
221 | Kick iframe videos, which dont like to redraw w/ transforms.
222 | Remove this if Webkit ever fixes it.
223 | */
224 | $.each(slides, function(i, $el) {
225 | $el.unbind('webkitTransitionEnd.deck').bind('webkitTransitionEnd.deck',
226 | function(event) {
227 | if ($el.hasClass($[deck]('getOptions').classes.current)) {
228 | var embeds = $(this).find('iframe').css('opacity', 0);
229 | window.setTimeout(function() {
230 | embeds.css('opacity', 1);
231 | }, 100);
232 | }
233 | });
234 | });
235 |
236 | if (slides.length) {
237 | updateStates();
238 | }
239 |
240 | // Show deck again now that slides are in place
241 | $container.removeClass(options.classes.loading);
242 | $d.trigger(events.initialize);
243 | },
244 |
245 | /*
246 | jQuery.deck('go', index)
247 |
248 | index: integer | string
249 |
250 | Moves to the slide at the specified index if index is a number. Index is
251 | 0-based, so $.deck('go', 0); will move to the first slide. If index is a
252 | string this will move to the slide with the specified id. If index is out
253 | of bounds or doesn't match a slide id the call is ignored.
254 | */
255 | go: function(index) {
256 | var e = $.Event(events.change),
257 | ndx;
258 |
259 | /* Number index, easy. */
260 | if (typeof index === 'number' && index >= 0 && index < slides.length) {
261 | ndx = index;
262 | }
263 | /* Id string index, search for it and set integer index */
264 | else if (typeof index === 'string') {
265 | $.each(slides, function(i, $slide) {
266 | if ($slide.attr('id') === index) {
267 | ndx = i;
268 | return false;
269 | }
270 | });
271 | };
272 |
273 | /* Out of bounds, id doesn't exist, illegal input, eject */
274 | if (typeof ndx === 'undefined') return;
275 |
276 | $d.trigger(e, [current, ndx]);
277 | if (e.isDefaultPrevented()) {
278 | /* Trigger the event again and undo the damage done by extensions. */
279 | $d.trigger(events.change, [ndx, current]);
280 | }
281 | else {
282 | current = ndx;
283 | updateStates();
284 | }
285 | },
286 |
287 | /*
288 | jQuery.deck('next')
289 |
290 | Moves to the next slide. If the last slide is already active, the call
291 | is ignored.
292 | */
293 | next: function() {
294 | methods.go(current+1);
295 | },
296 |
297 | /*
298 | jQuery.deck('prev')
299 |
300 | Moves to the previous slide. If the first slide is already active, the
301 | call is ignored.
302 | */
303 | prev: function() {
304 | methods.go(current-1);
305 | },
306 |
307 | /*
308 | jQuery.deck('getSlide', index)
309 |
310 | index: integer, optional
311 |
312 | Returns a jQuery object containing the slide at index. If index is not
313 | specified, the current slide is returned.
314 | */
315 | getSlide: function(index) {
316 | var i = typeof index !== 'undefined' ? index : current;
317 | if (typeof i != 'number' || i < 0 || i >= slides.length) return null;
318 | return slides[i];
319 | },
320 |
321 | /*
322 | jQuery.deck('getSlides')
323 |
324 | Returns all slides as an array of jQuery objects.
325 | */
326 | getSlides: function() {
327 | return slides;
328 | },
329 |
330 | /*
331 | jQuery.deck('getContainer')
332 |
333 | Returns a jQuery object containing the deck container as defined by the
334 | container option.
335 | */
336 | getContainer: function() {
337 | return $container;
338 | },
339 |
340 | /*
341 | jQuery.deck('getOptions')
342 |
343 | Returns the options object for the deck, including any overrides that
344 | were defined at initialization.
345 | */
346 | getOptions: function() {
347 | return options;
348 | },
349 |
350 | /*
351 | jQuery.deck('extend', name, method)
352 |
353 | name: string
354 | method: function
355 |
356 | Adds method to the deck namespace with the key of name. This doesn’t
357 | give access to any private member data — public methods must still be
358 | used within method — but lets extension authors piggyback on the deck
359 | namespace rather than pollute jQuery.
360 |
361 | $.deck('extend', 'alert', function(msg) {
362 | alert(msg);
363 | });
364 |
365 | // Alerts 'boom'
366 | $.deck('alert', 'boom');
367 | */
368 | extend: function(name, method) {
369 | methods[name] = method;
370 | }
371 | };
372 |
373 | /* jQuery extension */
374 | $[deck] = function(method, arg) {
375 | if (methods[method]) {
376 | return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
377 | }
378 | else {
379 | return methods.init(method, arg);
380 | }
381 | };
382 |
383 | /*
384 | The default settings object for a deck. All deck extensions should extend
385 | this object to add defaults for any of their options.
386 |
387 | options.classes.after
388 | This class is added to all slides that appear after the 'next' slide.
389 |
390 | options.classes.before
391 | This class is added to all slides that appear before the 'previous'
392 | slide.
393 |
394 | options.classes.childCurrent
395 | This class is added to all elements in the DOM tree between the
396 | 'current' slide and the deck container. For standard slides, this is
397 | mostly seen and used for nested slides.
398 |
399 | options.classes.current
400 | This class is added to the current slide.
401 |
402 | options.classes.loading
403 | This class is applied to the deck container during loading phases and is
404 | primarily used as a way to short circuit transitions between states
405 | where such transitions are distracting or unwanted. For example, this
406 | class is applied during deck initialization and then removed to prevent
407 | all the slides from appearing stacked and transitioning into place
408 | on load.
409 |
410 | options.classes.next
411 | This class is added to the slide immediately following the 'current'
412 | slide.
413 |
414 | options.classes.onPrefix
415 | This prefix, concatenated with the current slide index, is added to the
416 | deck container as you change slides.
417 |
418 | options.classes.previous
419 | This class is added to the slide immediately preceding the 'current'
420 | slide.
421 |
422 | options.selectors.container
423 | Elements matched by this CSS selector will be considered the deck
424 | container. The deck container is used to scope certain states of the
425 | deck, as with the onPrefix option, or with extensions such as deck.goto
426 | and deck.menu.
427 |
428 | options.keys.next
429 | The numeric keycode used to go to the next slide.
430 |
431 | options.keys.previous
432 | The numeric keycode used to go to the previous slide.
433 |
434 | options.touch.swipeTolerance
435 | The number of pixels the users finger must travel to produce a swipe
436 | gesture.
437 | */
438 | $[deck].defaults = {
439 | classes: {
440 | after: 'deck-after',
441 | before: 'deck-before',
442 | childCurrent: 'deck-child-current',
443 | current: 'deck-current',
444 | loading: 'deck-loading',
445 | next: 'deck-next',
446 | onPrefix: 'on-slide-',
447 | previous: 'deck-previous'
448 | },
449 |
450 | selectors: {
451 | container: '.deck-container'
452 | },
453 |
454 | keys: {
455 | // enter, space, page down, right arrow, down arrow,
456 | next: [13, 32, 34, 39, 40],
457 | // backspace, page up, left arrow, up arrow
458 | previous: [8, 33, 37, 38]
459 | },
460 |
461 | touch: {
462 | swipeTolerance: 60
463 | }
464 | };
465 |
466 | $d.ready(function() {
467 | $('html').addClass('ready');
468 | });
469 |
470 | /*
471 | FF + Transforms + Flash video don't get along...
472 | Firefox will reload and start playing certain videos after a
473 | transform. Blanking the src when a previously shown slide goes out
474 | of view prevents this.
475 | */
476 | $d.bind('deck.change', function(e, from, to) {
477 | var oldFrames = $[deck]('getSlide', from).find('iframe'),
478 | newFrames = $[deck]('getSlide', to).find('iframe');
479 |
480 | oldFrames.each(function() {
481 | var $this = $(this),
482 | curSrc = $this.attr('src');
483 |
484 | if(curSrc) {
485 | $this.data('deck-src', curSrc).attr('src', '');
486 | }
487 | });
488 |
489 | newFrames.each(function() {
490 | var $this = $(this),
491 | originalSrc = $this.data('deck-src');
492 |
493 | if (originalSrc) {
494 | $this.attr('src', originalSrc);
495 | }
496 | });
497 | });
498 | })(jQuery, 'deck', document);
499 |
--------------------------------------------------------------------------------
/slides/core/deck.core.scss:
--------------------------------------------------------------------------------
1 | html {
2 | height:100%;
3 | }
4 |
5 | .deck-container {
6 | position:relative;
7 | height:100%;
8 | width:70%;
9 | margin:0 auto;
10 | padding:0 48px;
11 | font-size:16px;
12 | line-height:1.25;
13 | overflow:hidden;
14 |
15 | .js & {
16 | visibility:hidden;
17 | }
18 |
19 | .ready & {
20 | visibility:visible;
21 | }
22 |
23 | .touch & {
24 | -webkit-text-size-adjust:none;
25 | }
26 |
27 | /* Resets and base styles from HTML5 Boilerplate */
28 | div, span, object, iframe,
29 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
30 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
31 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
32 | fieldset, form, label, legend,
33 | table, caption, tbody, tfoot, thead, tr, th, td,
34 | article, aside, canvas, details, figcaption, figure,
35 | footer, header, hgroup, menu, nav, section, summary,
36 | time, mark, audio, video {
37 | margin: 0;
38 | padding: 0;
39 | border: 0;
40 | font-size: 100%;
41 | font: inherit;
42 | vertical-align: baseline;
43 | }
44 |
45 | article, aside, details, figcaption, figure,
46 | footer, header, hgroup, menu, nav, section {
47 | display: block;
48 | }
49 |
50 | blockquote, q {
51 | quotes:none;
52 |
53 | &:before, &:after {
54 | content:"";
55 | content:none;
56 | }
57 | }
58 |
59 | ins {
60 | background-color:#ff9;
61 | color:#000;
62 | text-decoration:none;
63 | }
64 |
65 | mark {
66 | background-color:#ff9;
67 | color:#000;
68 | font-style:italic;
69 | font-weight:bold;
70 | }
71 |
72 | del {
73 | text-decoration:line-through;
74 | }
75 |
76 | abbr[title], dfn[title] {
77 | border-bottom:1px dotted;
78 | cursor:help;
79 | }
80 |
81 | table {
82 | border-collapse:collapse;
83 | border-spacing:0;
84 | }
85 |
86 | hr {
87 | display:block;
88 | height:1px;
89 | border:0;
90 | border-top:1px solid #ccc;
91 | margin:1em 0;
92 | padding:0;
93 | }
94 |
95 | input, select {
96 | vertical-align:middle;
97 | }
98 |
99 | select, input, textarea, button {
100 | font:99% sans-serif;
101 | }
102 |
103 | pre, code, kbd, samp {
104 | font-family:monospace, sans-serif;
105 | }
106 |
107 | a {
108 | -webkit-tap-highlight-color:rgba(0,0,0,0);
109 |
110 | &:hover, &:active {
111 | outline:none;
112 | }
113 | }
114 |
115 | ul, ol {
116 | margin-left:2em;
117 | vertical-align:top;
118 | }
119 |
120 | ol {
121 | list-style-type:decimal;
122 | }
123 |
124 | nav {
125 | ul, li {
126 | margin:0;
127 | list-style:none;
128 | list-style-image:none;
129 | }
130 | }
131 |
132 | small {
133 | font-size:85%;
134 | }
135 |
136 | strong, th {
137 | font-weight:bold;
138 | }
139 |
140 | td {
141 | vertical-align:top;
142 | }
143 |
144 | sub, sup {
145 | font-size:75%;
146 | line-height:0;
147 | position:relative;
148 | }
149 |
150 | sup {
151 | top:-0.5em;
152 | }
153 |
154 | sub { bottom: -0.25em; }
155 |
156 | textarea {
157 | overflow:auto;
158 | }
159 |
160 | legend {
161 | .ie6 &, .ie7 & {
162 | margin-left:-7px;
163 | }
164 | }
165 |
166 | input[type="radio"] {
167 | vertical-align:text-bottom;
168 | }
169 |
170 | input[type="checkbox"] {
171 | vertical-align:bottom;
172 | }
173 |
174 | .ie7 & input[type="checkbox"] {
175 | vertical-align:baseline;
176 | }
177 |
178 | .ie6 & input {
179 | vertical-align:text-bottom;
180 | }
181 |
182 | label, input[type="button"], input[type="submit"], input[type="image"], button {
183 | cursor:pointer;
184 | }
185 |
186 | button, input, select, textarea {
187 | margin: 0;
188 | }
189 |
190 | input, textarea {
191 | &:invalid {
192 | border-radius:1px;
193 | -moz-box-shadow:0px 0px 5px red;
194 | -webkit-box-shadow:0px 0px 5px red;
195 | box-shadow: 0px 0px 5px red;
196 |
197 | .no-boxshadow {
198 | background-color: #f0dddd;
199 | }
200 | }
201 | }
202 |
203 | button {
204 | width:auto;
205 | overflow:visible;
206 | }
207 |
208 | .ie7 & img {
209 | -ms-interpolation-mode: bicubic; }
210 |
211 | &, select, input, textarea {
212 | color:#444;
213 | }
214 |
215 | a {
216 | color:#607890;
217 |
218 | &:hover, &:focus {
219 | color:#036;
220 | }
221 |
222 | &:link {
223 | -webkit-tap-highlight-color: #fff;
224 | }
225 | }
226 | /* End HTML5 Boilerplate adaptations */
227 |
228 | &.deck-loading {
229 | display:none;
230 | }
231 | }
232 |
233 | .slide {
234 | width:auto;
235 | min-height:100%;
236 | position:relative;
237 |
238 | h1 {
239 | font-size:4.5em;
240 | }
241 |
242 | h1, .vcenter {
243 | font-weight:bold;
244 | text-align:center;
245 | padding-top:1em;
246 | max-height:100%;
247 |
248 | .csstransforms & {
249 | padding:0 48px;
250 | position:absolute;
251 | left:0;
252 | right:0;
253 | top:50%;
254 | -webkit-transform:translate(0, -50%);
255 | -moz-transform:translate(0, -50%);
256 | -ms-transform:translate(0, -50%);
257 | -o-transform:translate(0, -50%);
258 | transform:translate(0, -50%);
259 | }
260 | }
261 |
262 | .vcenter h1 {
263 | position:relative;
264 | top:auto;
265 | padding:0;
266 | -webkit-transform:none;
267 | -moz-transform:none;
268 | -ms-transform:none;
269 | -o-transform:none;
270 | transform:none;
271 | }
272 |
273 | h2 {
274 | font-size:2.25em;
275 | font-weight:bold;
276 | padding-top:.5em;
277 | margin:0 0 .66666em 0;
278 | border-bottom:3px solid #888;
279 | }
280 |
281 | h3 {
282 | font-size:1.4375em;
283 | font-weight:bold;
284 | margin-bottom:.30435em;
285 | }
286 |
287 | h4 {
288 | font-size:1.25em;
289 | font-weight:bold;
290 | margin-bottom:.25em;
291 | }
292 |
293 | h5 {
294 | font-size:1.125em;
295 | font-weight:bold;
296 | margin-bottom:.2222em;
297 | }
298 |
299 | h6 {
300 | font-size:1em;
301 | font-weight:bold;
302 | }
303 |
304 | img, iframe, video {
305 | display:block;
306 | max-width:100%;
307 | }
308 |
309 | video, iframe, img {
310 | display:block;
311 | margin:0 auto;
312 | }
313 |
314 | p, blockquote, iframe, img, ul, ol, pre, video {
315 | margin-bottom:1em;
316 | }
317 |
318 | pre {
319 | white-space:pre;
320 | white-space:pre-wrap;
321 | word-wrap:break-word;
322 | padding: 1em;
323 | border:1px solid #888;
324 | }
325 |
326 | em {
327 | font-style:italic;
328 | }
329 |
330 | li {
331 | padding:.25em 0;
332 | vertical-align:middle;
333 | }
334 | }
335 |
336 | .deck-before, .deck-previous, .deck-next, .deck-after {
337 | position:absolute;
338 | left:-999em;
339 | top:-999em;
340 | }
341 |
342 | .deck-current {
343 | z-index:2;
344 | }
345 |
346 | .slide .slide {
347 | visibility:hidden;
348 | position:static;
349 | min-height:0;
350 | }
351 |
352 | .deck-child-current {
353 | position:static;
354 | z-index:2;
355 |
356 | .slide {
357 | visibility:hidden;
358 | }
359 |
360 | .deck-previous, .deck-before, .deck-current {
361 | visibility:visible;
362 | }
363 | }
364 |
365 | body.deck-container {
366 | overflow:visible;
367 | }
368 |
369 | @media all and (orientation:portrait) {
370 |
371 | }
372 |
373 | @media all and (orientation:landscape) {
374 |
375 | }
376 |
377 | @media screen and (max-device-width: 480px) {
378 |
379 | /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
380 | }
381 |
382 |
383 | @media print {
384 | * {
385 | background: transparent !important;
386 | color: black !important;
387 | text-shadow: none !important;
388 | filter:none !important;
389 | -ms-filter: none !important;
390 | -webkit-box-reflect:none !important;
391 | -moz-box-reflect:none !important;
392 | -webkit-box-shadow:none !important;
393 | -moz-box-shadow:none !important;
394 | box-shadow:none !important;
395 |
396 | :before, :after {
397 | display:none !important;
398 | }
399 | }
400 | a, a:visited { color: #444 !important; text-decoration: underline; }
401 | a[href]:after { content: " (" attr(href) ")"; }
402 | abbr[title]:after { content: " (" attr(title) ")"; }
403 | .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
404 | pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
405 | thead { display: table-header-group; }
406 | tr, img { page-break-inside: avoid; }
407 | @page { margin: 0.5cm; }
408 | p, h2, h3 { orphans: 3; widows: 3; }
409 | h2, h3{ page-break-after: avoid; }
410 |
411 | .slide {
412 | position:static !important;
413 | visibility:visible !important;
414 | display:block !important;
415 | -webkit-transform:none !important;
416 | -moz-transform:none !important;
417 | -o-transform:none !important;
418 | -ms-transform:none !important;
419 | transform:none !important;
420 | opacity:1 !important;
421 | }
422 |
423 | h1, .vcenter {
424 | -webkit-transform:none !important;
425 | -moz-transform:none !important;
426 | -o-transform:none !important;
427 | -ms-transform:none !important;
428 | transform:none !important;
429 | padding:0 !important;
430 | position:static !important;
431 | }
432 |
433 | .deck-container > .slide {
434 | page-break-after: always;
435 | }
436 |
437 | .deck-container {
438 | width:100% !important;
439 | height:auto !important;
440 | padding:0 !important;
441 | display:block !important;
442 | }
443 |
444 | script {
445 | display:none;
446 | }
447 | }
448 |
--------------------------------------------------------------------------------
/slides/dtrace-erlang.css:
--------------------------------------------------------------------------------
1 | .deck-container .theme-menu {
2 | display: none;
3 | position: fixed;
4 | z-index: 3;
5 | bottom: 10px;
6 | left: 10px;
7 | height: 20px;
8 | line-height: 20px;
9 | padding: 5px;
10 | border: 1px solid #ddd;
11 | -webkit-border-radius: 5px;
12 | -moz-border-radius: 5px;
13 | border-radius: 5px;
14 | overflow: hidden;
15 | background: #fff;
16 | font-family: sans-serif;
17 | color: #888;
18 | }
19 | .js .deck-container .theme-menu {
20 | display: block;
21 | }
22 | .deck-container .theme-menu h2 {
23 | float: left;
24 | font-size: 20px;
25 | border: 0;
26 | padding: 5px 10px;
27 | margin: 0;
28 | height: 20px;
29 | position: relative;
30 | top: -5px;
31 | left: -5px;
32 | background: #ccc;
33 | color: #444;
34 | text-shadow: none;
35 | font-family: sans-serif;
36 | font-weight: bold;
37 | }
38 | .deck-container .theme-menu label {
39 | float: left;
40 | display: block;
41 | font-size: 12px;
42 | vertical-align: baseline;
43 | margin: 0 4px 0 15px;
44 | }
45 | .deck-container .theme-menu select {
46 | float: left;
47 | display: block;
48 | font-size: 14px;
49 | }
50 |
51 | @media print {
52 | .theme-menu {
53 | display: none !important;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/slides/dtrace-erlang.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | // Deck initialization
3 | $.deck('.slide');
4 |
5 | $('#style-themes').change(function() {
6 | $('#style-theme-link').attr('href', $(this).val());
7 | });
8 |
9 | $('#transition-themes').change(function() {
10 | $('#transition-theme-link').attr('href', $(this).val());
11 | });
12 | });
13 |
14 |
--------------------------------------------------------------------------------
/slides/dtrace-erlang.scss:
--------------------------------------------------------------------------------
1 | .deck-container {
2 | .theme-menu {
3 | display:none;
4 | position:fixed;
5 | z-index:3;
6 | bottom:10px;
7 | left:10px;
8 | height:20px;
9 | line-height:20px;
10 | padding:5px;
11 | border:1px solid #ddd;
12 | -webkit-border-radius:5px;
13 | -moz-border-radius:5px;
14 | border-radius:5px;
15 | overflow:hidden;
16 | background:#fff;
17 | font-family:sans-serif;
18 | color:#888;
19 |
20 | .js & {
21 | display:block;
22 | }
23 |
24 | h2 {
25 | float:left;
26 | font-size:20px;
27 | border:0;
28 | padding:5px 10px;
29 | margin:0;
30 | height:20px;
31 | position:relative;
32 | top:-5px;
33 | left:-5px;
34 | background:#ccc;
35 | color:#444;
36 | text-shadow:none;
37 | font-family:sans-serif;
38 | font-weight:bold;
39 | }
40 |
41 | label {
42 | float:left;
43 | display:block;
44 | font-size:12px;
45 | vertical-align:baseline;
46 | margin:0 4px 0 15px;
47 | }
48 |
49 | select {
50 | float:left;
51 | display:block;
52 | font-size:14px;
53 | }
54 | }
55 | }
56 |
57 | @media print {
58 | .theme-menu {
59 | display:none !important;
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/slides/extensions/goto/deck.goto.css:
--------------------------------------------------------------------------------
1 | .deck-container .goto-form {
2 | position: absolute;
3 | z-index: 3;
4 | bottom: 10px;
5 | left: 50%;
6 | height: 1.75em;
7 | margin: 0 0 0 -9.125em;
8 | line-height: 1.75em;
9 | padding: 0.625em;
10 | display: none;
11 | background: #ccc;
12 | overflow: hidden;
13 | }
14 | .borderradius .deck-container .goto-form {
15 | -webkit-border-radius: 10px;
16 | -moz-border-radius: 10px;
17 | border-radius: 10px;
18 | }
19 | .deck-container .goto-form label {
20 | font-weight: bold;
21 | }
22 | .deck-container .goto-form label, .deck-container .goto-form input {
23 | display: inline-block;
24 | font-family: inherit;
25 | }
26 |
27 | .deck-goto .goto-form {
28 | display: block;
29 | }
30 |
31 | #goto-slide {
32 | width: 8.375em;
33 | margin: 0 0.625em;
34 | height: 1.4375em;
35 | }
36 |
37 | @media print {
38 | .goto-form, #goto-slide {
39 | display: none !important;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/slides/extensions/goto/deck.goto.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/slides/extensions/goto/deck.goto.js:
--------------------------------------------------------------------------------
1 | /*!
2 | Deck JS - deck.goto
3 | Copyright (c) 2011 Caleb Troughton
4 | Dual licensed under the MIT license and GPL license.
5 | https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6 | https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
7 | */
8 |
9 | /*
10 | This module adds the necessary methods and key bindings to show and hide a form
11 | for jumping to any slide number/id in the deck (and processes that form
12 | accordingly). The form-showing state is indicated by the presence of a class on
13 | the deck container.
14 | */
15 | (function($, deck, undefined) {
16 | var $d = $(document);
17 |
18 | /*
19 | Extends defaults/options.
20 |
21 | options.classes.goto
22 | This class is added to the deck container when showing the Go To Slide
23 | form.
24 |
25 | options.selectors.gotoDatalist
26 | The element that matches this selector is the datalist element that will
27 | be populated with options for each of the slide ids. In browsers that
28 | support the datalist element, this provides a drop list of slide ids to
29 | aid the user in selecting a slide.
30 |
31 | options.selectors.gotoForm
32 | The element that matches this selector is the form that is submitted
33 | when a user hits enter after typing a slide number/id in the gotoInput
34 | element.
35 |
36 | options.selectors.gotoInput
37 | The element that matches this selector is the text input field for
38 | entering a slide number/id in the Go To Slide form.
39 |
40 | options.keys.goto
41 | The numeric keycode used to show the Go To Slide form.
42 | */
43 | $.extend(true, $[deck].defaults, {
44 | classes: {
45 | goto: 'deck-goto'
46 | },
47 |
48 | selectors: {
49 | gotoDatalist: '#goto-datalist',
50 | gotoForm: '.goto-form',
51 | gotoInput: '#goto-slide'
52 | },
53 |
54 | keys: {
55 | goto: 71 // g
56 | }
57 | });
58 |
59 | /*
60 | jQuery.deck('showGoTo')
61 |
62 | Shows the Go To Slide form by adding the class specified by the goto class
63 | option to the deck container.
64 | */
65 | $[deck]('extend', 'showGoTo', function() {
66 | $[deck]('getContainer').addClass($[deck]('getOptions').classes.goto);
67 | $($[deck]('getOptions').selectors.gotoInput).focus();
68 | });
69 |
70 | /*
71 | jQuery.deck('hideGoTo')
72 |
73 | Hides the Go To Slide form by removing the class specified by the goto class
74 | option from the deck container.
75 | */
76 | $[deck]('extend', 'hideGoTo', function() {
77 | $($[deck]('getOptions').selectors.gotoInput).blur();
78 | $[deck]('getContainer').removeClass($[deck]('getOptions').classes.goto);
79 | });
80 |
81 | /*
82 | jQuery.deck('toggleGoTo')
83 |
84 | Toggles between showing and hiding the Go To Slide form.
85 | */
86 | $[deck]('extend', 'toggleGoTo', function() {
87 | $[deck]($[deck]('getContainer').hasClass($[deck]('getOptions').classes.goto) ? 'hideGoTo' : 'showGoTo');
88 | });
89 |
90 | $d.bind('deck.init', function() {
91 | var opts = $[deck]('getOptions'),
92 | $datalist = $(opts.selectors.gotoDatalist);
93 |
94 | // Bind key events
95 | $d.unbind('keydown.deckgoto').bind('keydown.deckgoto', function(e) {
96 | var key = $[deck]('getOptions').keys.goto;
97 |
98 | if (e.which === key || $.inArray(e.which, key) > -1) {
99 | e.preventDefault();
100 | $[deck]('toggleGoTo');
101 | }
102 | });
103 |
104 | /* Populate datalist */
105 | $.each($[deck]('getSlides'), function(i, $slide) {
106 | var id = $slide.attr('id');
107 |
108 | if (id) {
109 | $datalist.append('
46 | Typical Scenario:
47 |
48 | A customer 99th/100th percentile latency SLA alarm fires a couple times a week.
49 |
50 | - Pagers go off, people get woken up.
51 | - This should never happen.
52 |
53 |
54 | Problem is not reproducible in Basho or customer labs.
55 |
56 | - We need to test/debug in production :(
57 | - This should never happen.
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | Visibility Into Production Systems
>
66 | Typical Solution:
67 |
68 | Collect data using native Erlang tracing.
69 | Analyze offline with R.
70 | Deliver candidate fix as hot-patch to customer
71 | Repeat until fixed
72 |
73 | - Typical Cost: Sr. Engineer, 1-4 hours 1-4 times/week, 1-4 weeks
74 | - Basho employees deploying hotfixes to customer's production networks
75 | - This should never happen!
76 |
77 |
78 |
79 |
88 |
89 |
90 | DTrace Probes
91 | Code annotations that fire when enabled
92 | Dynamic: NOOP instructions when disabled
93 | Kernel hot-patches running executable to enable probes
94 |
95 | Probe event-gathering infrastructure, D scripting language
96 |
97 |
98 |
99 | DTrace Architecture
100 |
101 |
102 |
103 | Why DTrace?
104 | DTrace Unifies:
105 |
106 | - Definition of kernel and user space probes.
107 | - Tools used for kernel and user tracing.
108 | - Tools used for production vs. debugging/testing
109 | - Tools used across languages/infrastructure: C/C++/Java/Python/Ruby/MySQL,Postgres
110 |
111 | Enabled probes: very small overhead
112 | Easy to add probes to applications
113 | Stable: won't crash kernel or app
114 |
115 |
116 |
117 | DTrace and Erlang
118 | Experimental integration done in 2008, abandoned
119 | 2011: DTrace will land in an R15X release
120 | OSX, Solaris, Linux (via SystemTap)
121 | Authors:
122 |
123 | - Scott Fritchie (Basho)
124 | - Dustin Sallings (Couchbase)
125 | - Michal Ptaszek
126 |
127 |
128 |
129 |
130 |
131 | Erlang DTrace Provider
132 | Processes: spawn, exit, hibernate, scheduled
133 | Messages: send, queued, received, exit signals
134 | Memory: GC(minor/major), heap size changes
135 | Copying: within and across heaps
136 | Function calls: including BIFs, NIFs- entry and return
137 | Network: monitors, busy ports, output events
138 | Ports: open, command, control, busy/not busy
139 | Drivers: callback API 100% instrumented
140 | efile_drv.c: 100% instrumented
141 |
142 |
143 |
144 | Process Events
145 |
146 | /* dtrace -qs /path/to/this/script.d */
147 | erlang*:::process-spawn {
148 | printf("pid %s mfa %s\n",
149 | copyinstr(arg0), copyinstr(arg1))
150 | }
151 |
152 | erlang*:::process-exit {
153 | printf("pid %s reason %s\n",
154 | copyinstr(arg0), copyinstr(arg1))
155 | }
156 |
157 |
158 |
159 |
160 | Process Births and Deaths
161 |
162 | /* dtrace -s /path/to/this/script.d */
163 | BEGIN {
164 | spawns = exits = 0
165 | }
166 |
167 | erlang*:::process-spawn { spawns++ }
168 | erlang*:::process-exit { exits++ }
169 |
170 | profile:::tick-1sec {
171 | printf("Spawns %d exits %d", spawns, exits);
172 | spawns = exits = 0
173 | }
174 |
175 |
176 |
177 |
178 | Message Send -> Scheduling Latency
179 |
180 | /* Example from Dustin Sallings */
181 | /* dtrace -s /path/to/this/script */
182 | BEGIN { printf("Press control-c to print histogram\n") }
183 |
184 | erlang*:::message-send {
185 | sent[copyinstr(arg1)] = timestamp
186 | }
187 |
188 | erlang*:::process-scheduled
189 | / sent[copyinstr(arg0)] /
190 | {
191 | @t = quantize(timestamp - sent[copyinstr(arg0)]);
192 | sent[copyinstr(arg0)] = 0
193 | }
194 |
195 |
196 |
197 |
198 | Message Send -> Scheduling Latency
199 |
200 | sbb# dtrace -qs /tmp/send-to-sched.d
201 | Press control-c to print histogram
202 | ^C
203 | value ------------- Distribution ------------- count
204 | 8192 | 0
205 | 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@ 119
206 | 32768 |@@@@@@@@@@@@ 58
207 | 65536 |@@@ 13
208 | 131072 | 1
209 | 262144 | 0
210 |
211 | %% Run on an idle Erlang VM on power-saving laptop:
212 | %% application:start(sasl).
213 | %% application:start(crypto).
214 |
215 |
216 |
217 |
218 | Function calls > 1msec
219 |
220 | erlang*:::function-entry {
221 | self->start[copyinstr(arg0),
222 | copyinstr(arg1)] = timestamp
223 | }
224 |
225 | erlang*:::function-return
226 | /self->start[copyinstr(arg0),
227 | copyinstr(arg1)] != 0 &&
228 | timestamp - self->start[copyinstr(arg0),
229 | copyinstr(arg1)] > 1000000 /
230 | {
231 | duration = timestamp - (self->start[copyinstr(arg0),
232 | copyinstr(arg1)]);
233 | printf("CALL: %s - %s - %d nanoseconds\n",
234 | copyinstr(arg0), copyinstr(arg1), duration)
235 | }
236 |
237 |
238 |
239 |
240 | CPU Migrations
241 | Function call returns on different CPU than it started
242 |
243 | erlang*:::function-entry {
244 | _cpu[copyinstr(arg0), copyinstr(arg1), arg2] = cpu+1
245 | }
246 |
247 | erlang*:::function-return
248 | / _cpu[copyinstr(arg0), copyinstr(arg1), arg2] != 0 &&
249 | _cpu[copyinstr(arg0), copyinstr(arg1), arg2] != cpu+1 /
250 | {
251 | depth = arg2;
252 | proc = copyinstr(arg0);
253 | mfa = copyinstr(arg1);
254 | callcpu = _cpu[proc, mfa, depth] - 1;
255 | printf("%s %s @ stack depth %d: CPU %d -> %d\n",
256 | proc, mfa, depth, callcpu, cpu);
257 | }
258 |
259 | erlang*:::function-return
260 | { _cpu[copyinstr(arg0), copyinstr(arg1), arg2] = 0 }
261 |
262 |
263 |
264 |
265 |
266 | CPU Migrations
267 |
268 | <0.91.0> erl_eval:add_bindings/2 @ stack depth 4: CPU 4 -> 2
269 | <0.91.0> erl_eval:add_bindings/2 @ stack depth 4: CPU 2 -> 6
270 |
271 |
272 |
273 |
274 | Largest IO worker queue
275 |
276 | /* dtrace -s /path/to/this/script.d */
277 | BEGIN { biggest = 0 }
278 |
279 | erlang*:::aio_pool-add
280 | /arg1 > biggest/ { biggest = arg1 }
281 |
282 | profile:::tick-10sec {
283 | printf("Largest async work queue size: %d\n",
284 | biggest);
285 | biggest = 0;
286 | }
287 |
288 |
289 |
290 |
291 | file:rename
Message Path
292 |
293 |
294 |
295 |
296 |
297 | Probes from Erlang Code
298 |
299 | %% erlang*:::user_trace-i4s4 disabled
300 | > dtrace:p("Hello, world!").
301 | false
302 |
303 | %% erlang*:::user_trace-i4s4 enabled
304 | > dtrace:p(42).
305 | true
306 |
307 | %% Up to 4 integers and 4 iolist() args
308 | dtrace:p(1, 2, 4, 8, "a", "b", "c", "and d").
309 |
310 |
311 |
312 |
313 | Instruments (OS X)
314 | Performance analysis tool for OSX, based on DTrace.
315 |
316 |
317 |
318 |
319 | Custom Instruments
320 |
321 |
322 |
323 |
324 | Resources
325 |
332 |
333 | Questions?
334 |
335 |
336 |
337 | ←
338 | →
339 |
340 |
341 |
342 | /
343 |
344 |
345 | #
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
--------------------------------------------------------------------------------
/slides/modernizr.custom.js:
--------------------------------------------------------------------------------
1 | /* Modernizr 2.0.6 (Custom Build) | MIT & BSD
2 | * Contains: fontface | backgroundsize | borderimage | borderradius | boxshadow | flexbox | hsla | multiplebgs | opacity | rgba | textshadow | cssanimations | csscolumns | generatedcontent | cssgradients | cssreflections | csstransforms | csstransforms3d | csstransitions | applicationcache | canvas | canvastext | draganddrop | hashchange | history | audio | video | indexeddb | input | inputtypes | localstorage | postmessage | sessionstorage | websockets | websqldatabase | webworkers | geolocation | inlinesvg | smil | svg | svgclippaths | touch | webgl | iepp | cssclasses | addtest | teststyles | testprop | testallprops | hasevent | prefixes | domprefixes | load
3 | */
4 | ;window.Modernizr=function(a,b,c){function H(){e.input=function(a){for(var b=0,c=a.length;b",a,""].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),x,y={}.hasOwnProperty,z;!C(y,c)&&!C(y.call,c)?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)};var G=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return w("dragstart")&&w("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var I in r)z(r,I)&&(x=I.toLowerCase(),e[x]=r[I](),u.push((e[x]?"":"no-")+x));e.input||H(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},A(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b .slide {
22 | text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
23 | }
24 | .deck-container .slide h1, .deck-container .slide h2, .deck-container .slide h3, .deck-container .slide h4, .deck-container .slide h5, .deck-container .slide h6 {
25 | font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
26 | }
27 | .deck-container .slide h1 {
28 | color: #08455f;
29 | }
30 | .deck-container .slide h2 {
31 | color: #0b7495;
32 | border-bottom: 0;
33 | }
34 | .cssreflections .deck-container .slide h2 {
35 | line-height: 1;
36 | -webkit-box-reflect: below -0.556em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.3, transparent), color-stop(0.7, rgba(255, 255, 255, 0.1)), to(transparent));
37 | -moz-box-reflect: below -0.556em -moz-linear-gradient(top, transparent 0%, transparent 30%, rgba(255, 255, 255, 0.3) 100%);
38 | }
39 | .deck-container .slide h3 {
40 | color: #000;
41 | }
42 | .deck-container .slide pre {
43 | border-color: #cde;
44 | background: #fff;
45 | position: relative;
46 | z-index: auto;
47 | /* http://nicolasgallagher.com/css-drop-shadows-without-images/ */
48 | }
49 | .borderradius .deck-container .slide pre {
50 | -webkit-border-radius: 5px;
51 | -moz-border-radius: 5px;
52 | border-radius: 5px;
53 | }
54 | .csstransforms.boxshadow .deck-container .slide pre > :first-child:before {
55 | content: "";
56 | position: absolute;
57 | z-index: -1;
58 | background: #fff;
59 | top: 0;
60 | bottom: 0;
61 | left: 0;
62 | right: 0;
63 | }
64 | .csstransforms.boxshadow .deck-container .slide pre:before, .csstransforms.boxshadow .deck-container .slide pre:after {
65 | content: "";
66 | position: absolute;
67 | z-index: -2;
68 | bottom: 15px;
69 | width: 50%;
70 | height: 20%;
71 | max-width: 300px;
72 | -webkit-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
73 | -moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
74 | box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
75 | }
76 | .csstransforms.boxshadow .deck-container .slide pre:before {
77 | left: 10px;
78 | -webkit-transform: rotate(-3deg);
79 | -moz-transform: rotate(-3deg);
80 | -ms-transform: rotate(-3deg);
81 | -o-transform: rotate(-3deg);
82 | transform: rotate(-3deg);
83 | }
84 | .csstransforms.boxshadow .deck-container .slide pre:after {
85 | right: 10px;
86 | -webkit-transform: rotate(3deg);
87 | -moz-transform: rotate(3deg);
88 | -ms-transform: rotate(3deg);
89 | -o-transform: rotate(3deg);
90 | transform: rotate(3deg);
91 | }
92 | .deck-container .slide code {
93 | color: #789;
94 | }
95 | .deck-container .slide blockquote {
96 | font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
97 | font-size: 2em;
98 | padding: 1em 2em .5em 2em;
99 | color: #000;
100 | background: #fff;
101 | position: relative;
102 | border: 1px solid #cde;
103 | z-index: auto;
104 | }
105 | .borderradius .deck-container .slide blockquote {
106 | -webkit-border-radius: 5px;
107 | -moz-border-radius: 5px;
108 | border-radius: 5px;
109 | }
110 | .boxshadow .deck-container .slide blockquote > :first-child:before {
111 | content: "";
112 | position: absolute;
113 | z-index: -1;
114 | background: #fff;
115 | top: 0;
116 | bottom: 0;
117 | left: 0;
118 | right: 0;
119 | }
120 | .boxshadow .deck-container .slide blockquote:after {
121 | content: "";
122 | position: absolute;
123 | z-index: -2;
124 | top: 10px;
125 | bottom: 10px;
126 | left: 0;
127 | right: 50%;
128 | -moz-border-radius: 10px/100px;
129 | border-radius: 10px/100px;
130 | -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
131 | -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
132 | box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
133 | }
134 | .deck-container .slide blockquote p {
135 | margin: 0;
136 | }
137 | .deck-container .slide blockquote cite {
138 | font-size: .5em;
139 | font-style: normal;
140 | font-weight: bold;
141 | color: #888;
142 | }
143 | .deck-container .slide blockquote:before {
144 | content: "“";
145 | position: absolute;
146 | top: 0;
147 | left: 0;
148 | font-size: 5em;
149 | line-height: 1;
150 | color: #ccf0f0;
151 | z-index: 1;
152 | }
153 | .deck-container .slide ::-moz-selection {
154 | background: #08455f;
155 | color: #fff;
156 | }
157 | .deck-container .slide ::selection {
158 | background: #08455f;
159 | color: #fff;
160 | }
161 | .deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited {
162 | color: #599;
163 | text-decoration: none;
164 | }
165 | .deck-container .slide a:hover, .deck-container .slide a:focus {
166 | text-decoration: underline;
167 | }
168 | .deck-container .deck-prev-link, .deck-container .deck-next-link {
169 | background: #fff;
170 | opacity: 0.5;
171 | }
172 | .deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
173 | color: #599;
174 | }
175 | .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus {
176 | opacity: 1;
177 | text-decoration: none;
178 | }
179 | .deck-container .deck-status {
180 | font-size: 0.6666em;
181 | }
182 | .deck-container.deck-menu .slide {
183 | background: transparent;
184 | -webkit-border-radius: 5px;
185 | -moz-border-radius: 5px;
186 | border-radius: 5px;
187 | }
188 | .rgba .deck-container.deck-menu .slide {
189 | background: rgba(0, 0, 0, 0.1);
190 | }
191 | .deck-container.deck-menu .slide.deck-current, .rgba .deck-container.deck-menu .slide.deck-current, .no-touch .deck-container.deck-menu .slide:hover {
192 | background: #fff;
193 | }
194 | .deck-container .goto-form {
195 | background: #fff;
196 | border: 1px solid #cde;
197 | -webkit-border-radius: 5px;
198 | -moz-border-radius: 5px;
199 | border-radius: 5px;
200 | }
201 | .boxshadow .deck-container .goto-form {
202 | -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
203 | -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
204 | box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
205 | }
206 |
--------------------------------------------------------------------------------
/slides/themes/style/web-2.0.scss:
--------------------------------------------------------------------------------
1 | @mixin border-radius($r) {
2 | -webkit-border-radius:$r;
3 | -moz-border-radius:$r;
4 | border-radius:$r;
5 | }
6 |
7 | @mixin rotate($deg) {
8 | -webkit-transform:rotate($deg);
9 | -moz-transform:rotate($deg);
10 | -ms-transform:rotate($deg);
11 | -o-transform:rotate($deg);
12 | transform:rotate($deg);
13 | }
14 |
15 | @mixin box-shadow($x, $y, $blur, $color) {
16 | -webkit-box-shadow:$x $y $blur $color;
17 | -moz-box-shadow:$x $y $blur $color;
18 | box-shadow:$x $y $blur $color;
19 | }
20 |
21 |
22 | .deck-container {
23 | font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
24 | font-size:1.25em;
25 | background: rgb(244,250,254); /* Old browsers */
26 | background: -moz-linear-gradient(top, rgba(244,250,254,1) 0%, rgba(204,240,240,1) 100%); /* FF3.6+ */
27 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(244,250,254,1)), color-stop(100%,rgba(204,240,240,1))); /* Chrome,Safari4+ */
28 | background: -webkit-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* Chrome10+,Safari5.1+ */
29 | background: -o-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* Opera11.10+ */
30 | background: -ms-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* IE10+ */
31 | background: linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* W3C */
32 | background-attachment: fixed;
33 |
34 | > .slide {
35 | text-shadow:1px 1px 1px rgba(255,255,255,.5);
36 | }
37 |
38 | .slide {
39 | h1, h2, h3, h4, h5, h6 {
40 | font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
41 | }
42 |
43 | h1 {
44 | color:#08455f;
45 | }
46 |
47 | h2 {
48 | color:#0b7495;
49 | border-bottom:0;
50 |
51 | .cssreflections & {
52 | line-height:1;
53 | -webkit-box-reflect:below -0.5555em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.3, transparent), color-stop(0.7, rgba(255,255,255,.1)), to(transparent));
54 | -moz-box-reflect:below -0.5555em -moz-linear-gradient(top, transparent 0%, transparent 30%, rgba(255,255,255,.3) 100%);
55 | }
56 | }
57 |
58 | h3 {
59 | color:#000;
60 | }
61 |
62 | pre {
63 | border-color:#cde;
64 | background:#fff;
65 | position:relative;
66 | z-index:auto;
67 |
68 | .borderradius & {
69 | @include border-radius(5px);
70 | }
71 |
72 | /* http://nicolasgallagher.com/css-drop-shadows-without-images/ */
73 | .csstransforms.boxshadow & {
74 | > :first-child:before {
75 | content:"";
76 | position:absolute;
77 | z-index:-1;
78 | background:#fff;
79 | top:0;
80 | bottom:0;
81 | left:0;
82 | right:0;
83 | }
84 |
85 | &:before, &:after {
86 | content:"";
87 | position:absolute;
88 | z-index:-2;
89 | bottom:15px;
90 | width:50%;
91 | height:20%;
92 | max-width:300px;
93 | @include box-shadow(0, 15px, 10px, rgba(0, 0, 0, 0.7));
94 | }
95 |
96 | &:before {
97 | left:10px;
98 | @include rotate(-3deg);
99 | }
100 |
101 | &:after {
102 | right:10px;
103 | @include rotate(3deg);
104 | }
105 | }
106 | }
107 |
108 | code {
109 | color:#789;
110 | }
111 |
112 | blockquote {
113 | font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
114 | font-size:2em;
115 | padding:1em 2em .5em 2em;
116 | color:#000;
117 | background:#fff;
118 | position:relative;
119 | border:1px solid #cde;
120 | z-index:auto;
121 |
122 | .borderradius & {
123 | @include border-radius(5px);
124 | }
125 |
126 | .boxshadow & {
127 | > :first-child:before {
128 | content:"";
129 | position:absolute;
130 | z-index:-1;
131 | background:#fff;
132 | top:0;
133 | bottom:0;
134 | left:0;
135 | right:0;
136 | }
137 |
138 | &:after {
139 | content:"";
140 | position:absolute;
141 | z-index:-2;
142 | top: 10px;
143 | bottom: 10px;
144 | left: 0;
145 | right: 50%;
146 | -moz-border-radius: 10px / 100px;
147 | border-radius: 10px / 100px;
148 | @include box-shadow(0, 0, 15px, rgba(0,0,0,0.6));
149 | }
150 | }
151 |
152 | p {
153 | margin:0;
154 | }
155 |
156 | cite {
157 | font-size:.5em;
158 | font-style:normal;
159 | font-weight:bold;
160 | color:#888;
161 | }
162 |
163 | &:before {
164 | content:"“";
165 | position:absolute;
166 | top:0;
167 | left:0;
168 | font-size:5em;
169 | line-height:1;
170 | color:#ccf0f0;
171 | z-index:1;
172 | }
173 | }
174 |
175 | ::-moz-selection{ background:#08455f; color:#fff; }
176 | ::selection { background:#08455f; color:#fff; }
177 |
178 | a {
179 | &, &:hover, &:focus, &:active, &:visited {
180 | color:#599;
181 | text-decoration:none;
182 | }
183 |
184 | &:hover, &:focus {
185 | text-decoration:underline;
186 | }
187 | }
188 | }
189 |
190 | .deck-prev-link, .deck-next-link {
191 | background:#fff;
192 | opacity:0.5;
193 |
194 | &, &:hover, &:focus, &:active, &:visited {
195 | color:#599;
196 | }
197 |
198 | &:hover, &:focus {
199 | opacity:1;
200 | text-decoration:none;
201 | }
202 | }
203 |
204 | .deck-status {
205 | font-size:0.6666em;
206 | }
207 |
208 | &.deck-menu {
209 | .slide {
210 | background:transparent;
211 | @include border-radius(5px);
212 |
213 | .rgba & {
214 | background:rgba(0,0,0,.1);
215 | }
216 |
217 | &.deck-current, .rgba &.deck-current, .no-touch &:hover {
218 | background:#fff;
219 | }
220 | }
221 | }
222 |
223 | .goto-form {
224 | background:#fff;
225 | border:1px solid #cde;
226 | @include border-radius(5px);
227 |
228 | .boxshadow & {
229 | -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
230 | -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
231 | box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
232 | }
233 | }
234 | }
235 |
236 |
237 |
--------------------------------------------------------------------------------
/slides/themes/transition/fade.css:
--------------------------------------------------------------------------------
1 | .csstransitions.csstransforms .deck-container .slide {
2 | -webkit-transition: opacity 500ms ease-in-out 0ms;
3 | -moz-transition: opacity 500ms ease-in-out 0ms;
4 | -ms-transition: opacity 500ms ease-in-out 0ms;
5 | -o-transition: opacity 500ms ease-in-out 0ms;
6 | transition: opacity 500ms ease-in-out 0ms;
7 | }
8 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
9 | position: absolute;
10 | top: 0;
11 | left: 0;
12 | -webkit-box-sizing: border-box;
13 | -moz-box-sizing: border-box;
14 | box-sizing: border-box;
15 | width: 100%;
16 | padding: 0 48px;
17 | }
18 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
19 | position: relative;
20 | left: 0;
21 | top: 0;
22 | opacity: 0;
23 | }
24 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-before, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-previous {
25 | opacity: 0.4;
26 | }
27 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-current {
28 | opacity: 1;
29 | }
30 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
31 | opacity: 0;
32 | pointer-events: none;
33 | }
34 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
35 | visibility: visible;
36 | }
37 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
38 | opacity: 1;
39 | visibility: visible;
40 | pointer-events: auto;
41 | }
42 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current .deck-after {
43 | visibility: hidden;
44 | }
45 |
--------------------------------------------------------------------------------
/slides/themes/transition/fade.scss:
--------------------------------------------------------------------------------
1 | @mixin translate($x: 0, $y: 0, $z: 0) {
2 | -webkit-transform:translate3d($x, $y, $z);
3 | -moz-transform:translate($x, $y);
4 | -ms-transform:translate($x, $y);
5 | -o-transform:translate($x, $y);
6 | transform:translate3d($x, $y, $z);
7 | }
8 |
9 | @mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
10 | -webkit-transition:$prop $duration $easing $delay;
11 | -moz-transition:$prop $duration $easing $delay;
12 | -ms-transition:$prop $duration $easing $delay;
13 | -o-transition:$prop $duration $easing $delay;
14 | transition:$prop $duration $easing $delay;
15 | }
16 |
17 | .csstransitions.csstransforms {
18 | .deck-container .slide {
19 | @include transition(opacity, 500ms);
20 | }
21 |
22 | .deck-container:not(.deck-menu) {
23 | > .slide {
24 | position:absolute;
25 | top:0;
26 | left:0;
27 | -webkit-box-sizing: border-box;
28 | -moz-box-sizing: border-box;
29 | box-sizing: border-box;
30 | width:100%;
31 | padding:0 48px;
32 |
33 | .slide {
34 | position:relative;
35 | left:0;
36 | top:0;
37 | opacity:0;
38 | }
39 |
40 | .deck-before, .deck-previous {
41 | opacity:0.4;
42 | }
43 |
44 | .deck-current {
45 | opacity:1;
46 | }
47 | }
48 |
49 | > .deck-previous, > .deck-before, > .deck-next, > .deck-after {
50 | opacity:0;
51 | pointer-events:none;
52 | }
53 |
54 | > .deck-before, > .deck-previous {
55 | .slide {
56 | visibility:visible;
57 | }
58 | }
59 |
60 | > .deck-child-current {
61 | opacity:1;
62 | visibility:visible;
63 | pointer-events:auto;
64 |
65 | .deck-next, .deck-after {
66 | visibility:hidden;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/slides/themes/transition/horizontal-slide.css:
--------------------------------------------------------------------------------
1 | .csstransitions.csstransforms {
2 | overflow-x: hidden;
3 | }
4 | .csstransitions.csstransforms .deck-container > .slide {
5 | -webkit-transition: -webkit-transform 500ms ease-in-out;
6 | -moz-transition: -moz-transform 500ms ease-in-out;
7 | -ms-transition: -ms-transform 500ms ease-in-out;
8 | -o-transition: -o-transform 500ms ease-in-out;
9 | transition: transform 500ms ease-in-out;
10 | }
11 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
12 | position: absolute;
13 | top: 0;
14 | left: 0;
15 | -webkit-box-sizing: border-box;
16 | -moz-box-sizing: border-box;
17 | box-sizing: border-box;
18 | width: 100%;
19 | padding: 0 48px;
20 | }
21 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
22 | position: relative;
23 | left: 0;
24 | top: 0;
25 | -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
26 | -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
27 | -ms-transition: -ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
28 | -o-transition: -o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
29 | transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
30 | }
31 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after {
32 | visibility: visible;
33 | -webkit-transform: translate3d(200%, 0, 0);
34 | -moz-transform: translate(200%, 0);
35 | -ms-transform: translate(200%, 0);
36 | -o-transform: translate(200%, 0);
37 | transform: translate3d(200%, 0, 0);
38 | }
39 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-before, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-previous {
40 | opacity: 0.4;
41 | }
42 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous {
43 | -webkit-transform: translate3d(-200%, 0, 0);
44 | -moz-transform: translate(-200%, 0);
45 | -ms-transform: translate(-200%, 0);
46 | -o-transform: translate(-200%, 0);
47 | transform: translate3d(-200%, 0, 0);
48 | }
49 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before {
50 | -webkit-transform: translate3d(-400%, 0, 0);
51 | -moz-transform: translate(-400%, 0);
52 | -ms-transform: translate(-400%, 0);
53 | -o-transform: translate(-400%, 0);
54 | transform: translate3d(-400%, 0, 0);
55 | }
56 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next {
57 | -webkit-transform: translate3d(200%, 0, 0);
58 | -moz-transform: translate(200%, 0);
59 | -ms-transform: translate(200%, 0);
60 | -o-transform: translate(200%, 0);
61 | transform: translate3d(200%, 0, 0);
62 | }
63 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
64 | -webkit-transform: translate3d(400%, 0, 0);
65 | -moz-transform: translate(400%, 0);
66 | -ms-transform: translate(400%, 0);
67 | -o-transform: translate(400%, 0);
68 | transform: translate3d(400%, 0, 0);
69 | }
70 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
71 | visibility: visible;
72 | }
73 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
74 | -webkit-transform: none;
75 | -moz-transform: none;
76 | -ms-transform: none;
77 | -o-transform: none;
78 | transform: none;
79 | }
80 |
--------------------------------------------------------------------------------
/slides/themes/transition/horizontal-slide.scss:
--------------------------------------------------------------------------------
1 | @mixin translate($x: 0, $y: 0, $z: 0) {
2 | -webkit-transform:translate3d($x, $y, $z);
3 | -moz-transform:translate($x, $y);
4 | -ms-transform:translate($x, $y);
5 | -o-transform:translate($x, $y);
6 | transform:translate3d($x, $y, $z);
7 | }
8 |
9 | @mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
10 | -webkit-transition:$prop $duration $easing $delay;
11 | -moz-transition:$prop $duration $easing $delay;
12 | -ms-transition:$prop $duration $easing $delay;
13 | -o-transition:$prop $duration $easing $delay;
14 | transition:$prop $duration $easing $delay;
15 | }
16 |
17 | @mixin transform($val) {
18 | -webkit-transform:$val;
19 | -moz-transform:$val;
20 | -ms-transform:$val;
21 | -o-transform:$val;
22 | transform:$val;
23 | }
24 |
25 | .csstransitions.csstransforms {
26 | overflow-x:hidden;
27 |
28 | .deck-container > .slide {
29 | -webkit-transition:-webkit-transform 500ms ease-in-out;
30 | -moz-transition:-moz-transform 500ms ease-in-out;
31 | -ms-transition:-ms-transform 500ms ease-in-out;
32 | -o-transition:-o-transform 500ms ease-in-out;
33 | transition:transform 500ms ease-in-out;
34 | }
35 |
36 | .deck-container:not(.deck-menu) {
37 | > .slide {
38 | position:absolute;
39 | top:0;
40 | left:0;
41 | -webkit-box-sizing: border-box;
42 | -moz-box-sizing: border-box;
43 | box-sizing: border-box;
44 | width:100%;
45 | padding:0 48px;
46 |
47 | .slide {
48 | position:relative;
49 | left:0;
50 | top:0;
51 | -webkit-transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
52 | -moz-transition:-moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
53 | -ms-transition:-ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
54 | -o-transition:-o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
55 | transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
56 | }
57 |
58 | .deck-next, .deck-after {
59 | visibility:visible;
60 | @include translate(200%);
61 | }
62 |
63 | .deck-before, .deck-previous {
64 | opacity:0.4;
65 | }
66 | }
67 |
68 | > .deck-previous {
69 | @include translate(-200%);
70 | }
71 |
72 | > .deck-before {
73 | @include translate(-400%);
74 | }
75 |
76 | > .deck-next {
77 | @include translate(200%);
78 | }
79 |
80 | > .deck-after {
81 | @include translate(400%);
82 | }
83 |
84 | > .deck-before, > .deck-previous {
85 | .slide {
86 | visibility:visible;
87 | }
88 | }
89 |
90 | > .deck-child-current {
91 | @include transform(none);
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/slides/themes/transition/vertical-slide.css:
--------------------------------------------------------------------------------
1 | .csstransitions.csstransforms .deck-container {
2 | overflow-y: hidden;
3 | }
4 | .csstransitions.csstransforms .deck-container > .slide {
5 | -webkit-transition: -webkit-transform 500ms ease-in-out;
6 | -moz-transition: -moz-transform 500ms ease-in-out;
7 | -ms-transition: -ms-transform 500ms ease-in-out;
8 | -o-transition: -o-transform 500ms ease-in-out;
9 | transition: transform 500ms ease-in-out;
10 | }
11 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
12 | position: absolute;
13 | top: 0;
14 | left: 0;
15 | -webkit-box-sizing: border-box;
16 | -moz-box-sizing: border-box;
17 | box-sizing: border-box;
18 | width: 100%;
19 | padding: 0 48px;
20 | }
21 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
22 | position: relative;
23 | left: 0;
24 | top: 0;
25 | -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
26 | -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
27 | -ms-transition: -ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
28 | -o-transition: -o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
29 | transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
30 | }
31 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after {
32 | visibility: visible;
33 | -webkit-transform: translate3d(0, 1600px, 0);
34 | -moz-transform: translate(0, 1600px);
35 | -ms-transform: translate(0, 1600px);
36 | -o-transform: translate(0, 1600px);
37 | transform: translate3d(0, 1600px, 0);
38 | }
39 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-before, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-previous {
40 | opacity: 0.4;
41 | }
42 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous {
43 | -webkit-transform: translate3d(0, -200%, 0);
44 | -moz-transform: translate(0, -200%);
45 | -ms-transform: translate(0, -200%);
46 | -o-transform: translate(0, -200%);
47 | transform: translate3d(0, -200%, 0);
48 | }
49 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before {
50 | -webkit-transform: translate3d(0, -400%, 0);
51 | -moz-transform: translate(0, -400%);
52 | -ms-transform: translate(0, -400%);
53 | -o-transform: translate(0, -400%);
54 | transform: translate3d(0, -400%, 0);
55 | }
56 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next {
57 | -webkit-transform: translate3d(0, 200%, 0);
58 | -moz-transform: translate(0, 200%);
59 | -ms-transform: translate(0, 200%);
60 | -o-transform: translate(0, 200%);
61 | transform: translate3d(0, 200%, 0);
62 | }
63 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
64 | -webkit-transform: translate3d(0, 400%, 0);
65 | -moz-transform: translate(0, 400%);
66 | -ms-transform: translate(0, 400%);
67 | -o-transform: translate(0, 400%);
68 | transform: translate3d(0, 400%, 0);
69 | }
70 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
71 | visibility: visible;
72 | }
73 | .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
74 | -webkit-transform: none;
75 | -moz-transform: none;
76 | -ms-transform: none;
77 | -o-transform: none;
78 | transform: none;
79 | }
80 | .csstransitions.csstransforms .deck-prev-link {
81 | left: auto;
82 | right: 8px;
83 | top: 59px;
84 | -webkit-transform: rotate(90deg);
85 | -moz-transform: rotate(90deg);
86 | -ms-transform: rotate(90deg);
87 | -o-transform: rotate(90deg);
88 | transform: rotate(90deg);
89 | }
90 | .csstransitions.csstransforms .deck-next-link {
91 | top: 99px;
92 | -webkit-transform: rotate(90deg);
93 | -moz-transform: rotate(90deg);
94 | -ms-transform: rotate(90deg);
95 | -o-transform: rotate(90deg);
96 | transform: rotate(90deg);
97 | }
98 |
--------------------------------------------------------------------------------
/slides/themes/transition/vertical-slide.scss:
--------------------------------------------------------------------------------
1 | @mixin translate($x: 0, $y: 0, $z: 0) {
2 | -webkit-transform:translate3d($x, $y, $z);
3 | -moz-transform:translate($x, $y);
4 | -ms-transform:translate($x, $y);
5 | -o-transform:translate($x, $y);
6 | transform:translate3d($x, $y, $z);
7 | }
8 |
9 | @mixin rotate($deg) {
10 | -webkit-transform:rotate($deg);
11 | -moz-transform:rotate($deg);
12 | -ms-transform:rotate($deg);
13 | -o-transform:rotate($deg);
14 | transform:rotate($deg);
15 | }
16 |
17 | @mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
18 | -webkit-transition:$prop $duration $easing $delay;
19 | -moz-transition:$prop $duration $easing $delay;
20 | -ms-transition:$prop $duration $easing $delay;
21 | -o-transition:$prop $duration $easing $delay;
22 | transition:$prop $duration $easing $delay;
23 | }
24 |
25 | @mixin transform($val) {
26 | -webkit-transform:$val;
27 | -moz-transform:$val;
28 | -ms-transform:$val;
29 | -o-transform:$val;
30 | transform:$val;
31 | }
32 |
33 | .csstransitions.csstransforms {
34 | .deck-container {
35 | overflow-y:hidden;
36 |
37 | > .slide {
38 | -webkit-transition:-webkit-transform 500ms ease-in-out;
39 | -moz-transition:-moz-transform 500ms ease-in-out;
40 | -ms-transition:-ms-transform 500ms ease-in-out;
41 | -o-transition:-o-transform 500ms ease-in-out;
42 | transition:transform 500ms ease-in-out;
43 | }
44 | }
45 |
46 | .deck-container:not(.deck-menu) {
47 | > .slide {
48 | position:absolute;
49 | top:0;
50 | left:0;
51 | -webkit-box-sizing: border-box;
52 | -moz-box-sizing: border-box;
53 | box-sizing: border-box;
54 | width:100%;
55 | padding:0 48px;
56 |
57 | .slide {
58 | position:relative;
59 | left:0;
60 | top:0;
61 | -webkit-transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
62 | -moz-transition:-moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
63 | -ms-transition:-ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
64 | -o-transition:-o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
65 | transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
66 | }
67 |
68 | .deck-next, .deck-after {
69 | visibility:visible;
70 | @include translate(0, 1600px);
71 | }
72 |
73 | .deck-before, .deck-previous {
74 | opacity:0.4;
75 | }
76 | }
77 |
78 | > .deck-previous {
79 | @include translate(0, -200%);
80 | }
81 |
82 | > .deck-before {
83 | @include translate(0, -400%);
84 | }
85 |
86 | > .deck-next {
87 | @include translate(0, 200%);
88 | }
89 |
90 | > .deck-after {
91 | @include translate(0, 400%);
92 | }
93 |
94 | > .deck-before, > .deck-previous {
95 | .slide {
96 | visibility:visible;
97 | }
98 | }
99 |
100 | > .deck-child-current {
101 | @include transform(none);
102 | }
103 | }
104 |
105 | .deck-prev-link {
106 | left:auto;
107 | right:8px;
108 | top:59px;
109 | @include rotate(90deg);
110 | }
111 |
112 | .deck-next-link {
113 | top:99px;
114 | @include rotate(90deg);
115 | }
116 | }
--------------------------------------------------------------------------------