xref: /freebsd/contrib/bmake/trace.h (revision dba7b0ef928af88caa38728a73657b837aeeac93)
1*dba7b0efSSimon J. Gerraty /*	$NetBSD: trace.h,v 1.6 2021/01/19 20:51:46 rillig Exp $	*/
23955d011SMarcel Moolenaar 
3*dba7b0efSSimon J. Gerraty /*
43955d011SMarcel Moolenaar  * Copyright (c) 2000 The NetBSD Foundation, Inc.
53955d011SMarcel Moolenaar  * All rights reserved.
63955d011SMarcel Moolenaar  *
73955d011SMarcel Moolenaar  * This code is derived from software contributed to The NetBSD Foundation
83955d011SMarcel Moolenaar  * by Bill Sommerfeld
93955d011SMarcel Moolenaar  *
103955d011SMarcel Moolenaar  * Redistribution and use in source and binary forms, with or without
113955d011SMarcel Moolenaar  * modification, are permitted provided that the following conditions
123955d011SMarcel Moolenaar  * are met:
133955d011SMarcel Moolenaar  * 1. Redistributions of source code must retain the above copyright
143955d011SMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer.
153955d011SMarcel Moolenaar  * 2. Redistributions in binary form must reproduce the above copyright
163955d011SMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer in the
173955d011SMarcel Moolenaar  *    documentation and/or other materials provided with the distribution.
183955d011SMarcel Moolenaar  *
193955d011SMarcel Moolenaar  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
203955d011SMarcel Moolenaar  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
213955d011SMarcel Moolenaar  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
223955d011SMarcel Moolenaar  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
233955d011SMarcel Moolenaar  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
243955d011SMarcel Moolenaar  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
253955d011SMarcel Moolenaar  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
263955d011SMarcel Moolenaar  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
273955d011SMarcel Moolenaar  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
283955d011SMarcel Moolenaar  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
293955d011SMarcel Moolenaar  * POSSIBILITY OF SUCH DAMAGE.
303955d011SMarcel Moolenaar  */
313955d011SMarcel Moolenaar 
32*dba7b0efSSimon J. Gerraty /*
333955d011SMarcel Moolenaar  * trace.h --
343955d011SMarcel Moolenaar  *	Definitions pertaining to the tracing of jobs in parallel mode.
353955d011SMarcel Moolenaar  */
363955d011SMarcel Moolenaar 
3706b9b3e0SSimon J. Gerraty #ifndef MAKE_TRACE_H
3806b9b3e0SSimon J. Gerraty #define MAKE_TRACE_H
3906b9b3e0SSimon J. Gerraty 
40956e45f6SSimon J. Gerraty typedef enum TrEvent {
413955d011SMarcel Moolenaar 	MAKESTART,
423955d011SMarcel Moolenaar 	MAKEEND,
433955d011SMarcel Moolenaar 	MAKEERROR,
443955d011SMarcel Moolenaar 	JOBSTART,
453955d011SMarcel Moolenaar 	JOBEND,
463955d011SMarcel Moolenaar 	MAKEINTR
473955d011SMarcel Moolenaar } TrEvent;
483955d011SMarcel Moolenaar 
493955d011SMarcel Moolenaar void Trace_Init(const char *);
503955d011SMarcel Moolenaar void Trace_Log(TrEvent, Job *);
513955d011SMarcel Moolenaar void Trace_End(void);
523955d011SMarcel Moolenaar 
5306b9b3e0SSimon J. Gerraty #endif
54