syscall_debug_macros.hh revision 11794
111794Sbrandon.potter@amd.com/* 211794Sbrandon.potter@amd.com * Copyright (c) 2012-2013, 2015 ARM Limited 311794Sbrandon.potter@amd.com * Copyright (c) 2015-2016 Advanced Micro Devices, Inc. 411794Sbrandon.potter@amd.com * All rights reserved 511794Sbrandon.potter@amd.com * 611794Sbrandon.potter@amd.com * The license below extends only to copyright in the software and shall 711794Sbrandon.potter@amd.com * not be construed as granting a license to any other intellectual 811794Sbrandon.potter@amd.com * property including but not limited to intellectual property relating 911794Sbrandon.potter@amd.com * to a hardware implementation of the functionality of the software 1011794Sbrandon.potter@amd.com * licensed hereunder. You may use the software subject to the license 1111794Sbrandon.potter@amd.com * terms below provided that you ensure that this notice is replicated 1211794Sbrandon.potter@amd.com * unmodified and in its entirety in all distributions of the software, 1311794Sbrandon.potter@amd.com * modified or unmodified, in source code or in binary form. 1411794Sbrandon.potter@amd.com * 1511794Sbrandon.potter@amd.com * Copyright (c) 2003-2005 The Regents of The University of Michigan 1611794Sbrandon.potter@amd.com * All rights reserved. 1711794Sbrandon.potter@amd.com * 1811794Sbrandon.potter@amd.com * Redistribution and use in source and binary forms, with or without 1911794Sbrandon.potter@amd.com * modification, are permitted provided that the following conditions are 2011794Sbrandon.potter@amd.com * met: redistributions of source code must retain the above copyright 2111794Sbrandon.potter@amd.com * notice, this list of conditions and the following disclaimer; 2211794Sbrandon.potter@amd.com * redistributions in binary form must reproduce the above copyright 2311794Sbrandon.potter@amd.com * notice, this list of conditions and the following disclaimer in the 2411794Sbrandon.potter@amd.com * documentation and/or other materials provided with the distribution; 2511794Sbrandon.potter@amd.com * neither the name of the copyright holders nor the names of its 2611794Sbrandon.potter@amd.com * contributors may be used to endorse or promote products derived from 2711794Sbrandon.potter@amd.com * this software without specific prior written permission. 2811794Sbrandon.potter@amd.com * 2911794Sbrandon.potter@amd.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3011794Sbrandon.potter@amd.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3111794Sbrandon.potter@amd.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3211794Sbrandon.potter@amd.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3311794Sbrandon.potter@amd.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3411794Sbrandon.potter@amd.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3511794Sbrandon.potter@amd.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3611794Sbrandon.potter@amd.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3711794Sbrandon.potter@amd.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3811794Sbrandon.potter@amd.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3911794Sbrandon.potter@amd.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 4011794Sbrandon.potter@amd.com * 4111794Sbrandon.potter@amd.com * Authors: Steve Reinhardt 4211794Sbrandon.potter@amd.com * Kevin Lim 4311794Sbrandon.potter@amd.com * Brandon Potter 4411794Sbrandon.potter@amd.com */ 4511794Sbrandon.potter@amd.com 4611794Sbrandon.potter@amd.com#ifndef __SIM_SYSCALL_DEBUG_MACROS_HH__ 4711794Sbrandon.potter@amd.com#define __SIM_SYSCALL_DEBUG_MACROS_HH__ 4811794Sbrandon.potter@amd.com 4911794Sbrandon.potter@amd.com#include "debug/SyscallBase.hh" 5011794Sbrandon.potter@amd.com#include "debug/SyscallVerbose.hh" 5111794Sbrandon.potter@amd.com 5211794Sbrandon.potter@amd.com/** 5311794Sbrandon.potter@amd.com * This macro is intended to help with readability. 5411794Sbrandon.potter@amd.com * FLAGEXT specifies to which flag to assign the message: SyscallBase, 5511794Sbrandon.potter@amd.com * SyscallVerbose, etc..; notice that 'Syscall' is already prepended. 5611794Sbrandon.potter@amd.com * FMT is the message to be appended to the header information. The header 5711794Sbrandon.potter@amd.com * information contains the cpuid and thread id. 5811794Sbrandon.potter@amd.com */ 5911794Sbrandon.potter@amd.com#define DPRINTF_SYSCALL(FLAGEXT, FMT, ...) \ 6011794Sbrandon.potter@amd.com DPRINTFS(Syscall##FLAGEXT, tc->getCpuPtr(), "T%d : syscall " FMT, \ 6111794Sbrandon.potter@amd.com tc->threadId(), __VA_ARGS__) 6211794Sbrandon.potter@amd.com 6311794Sbrandon.potter@amd.com#endif // __SIM_SYSCALL_DEBUG_MACROS_HH__ 64