1/* 2 * %CopyrightBegin% 3 * 4 * Copyright Scott Lystig Fritchie and Andreas Schultz, 2011-2016. All Rights Reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * %CopyrightEnd% 19 */ 20/* 21 * Note: This file assumes that you're using the SMP-enabled Erlang 22 * virtual machine, "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.smp" with "beam.debug.smp" or the VM name appropriate 29 * to your environment. 30 */ 31 32probe process("beam.smp").mark("gc_major-start") 33{ 34 printf("GC major start pid %s need %d words\n", user_string($arg1), $arg2); 35} 36 37probe process("beam.smp").mark("gc_minor-start") 38{ 39 printf("GC minor start pid %s need %d words\n", user_string($arg1), $arg2); 40} 41 42probe process("beam.smp").mark("gc_major-end") 43{ 44 printf("GC major end pid %s reclaimed %d words\n", user_string($arg1), $arg2); 45} 46 47probe process("beam.smp").mark("gc_minor-start") 48{ 49 printf("GC minor end pid %s reclaimed %d words\n", user_string($arg1), $arg2); 50} 51