/* * Context.c. Python interfaces for perf script. * * Copyright (C) 2010 Tom Zanussi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include "../../../perf.h" #include "../../../util/trace-event.h" PyMODINIT_FUNC initperf_trace_context(void); static PyObject *perf_trace_context_common_pc(PyObject *obj, PyObject *args) { static struct scripting_context *scripting_context; PyObject *context; int retval; if (!PyArg_ParseTuple(args, "O", &context)) return NULL; scripting_context = PyCObject_AsVoidPtr(context); retval = common_pc(scripting_context); return Py_BuildValue("i", retval); } static PyObject *perf_trace_context_common_flags(PyObject *obj, PyObject *args) { static struct scripting_context *scripting_context; PyObject *context; int retval; if (!PyArg_ParseTuple(args, "O", &context)) return NULL; scripting_context = PyCObject_AsVoidPtr(context); retval = common_flags(scripting_context); return Py_BuildValue("i", retval); } static PyObject *perf_trace_context_common_lock_depth(PyObject *obj, PyObject *args) { static struct scripting_context *scripting_context; PyObject *context; int retval; if (!PyArg_ParseTuple(args, "O", &context)) return NULL; scripting_context = PyCObject_AsVoidPtr(context); retval = common_lock_depth(scripting_context); return Py_BuildValue("i", retval); } static PyMethodDef ContextMethods[] = { { "common_pc", perf_trace_context_common_pc, METH_VARARGS, "Get the common preempt count event field value."}, { "common_flags", perf_trace_context_common_flags, METH_VARARGS, "Get the common flags event field value."}, { "common_lock_depth", perf_trace_context_common_lock_depth, METH_VARARGS, "Get the common lock depth event field value."}, { NULL, NULL, 0, NULL} }; PyMODINIT_FUNC initperf_trace_context(void) { (void) Py_InitModule("perf_trace_context", ContextMethods); }
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2016-10-24 19:38:44 +0200
committerIngo Molnar <mingo@kernel.org>2016-10-25 11:48:50 +0200
commit59c6f278bdeea4147e8be92a3ed50a9907e60088 (patch)
tree6e7d1a71395d50b0fabcf0ccfa7e8c7d0ec91f2d /Documentation/devicetree
parent62a67e123e058a67db58bc6a14354dd037bafd0a (diff)
x86/cpu: Get rid of the show_msr= boot option
It is useless as it dumps the MSRs too early BUT(!) we do set MSRs later too. Also, it dumps only BSP MSRs as it gets called only for CPU 0. And the MSR range array would need constant updating anyway, and so on and so on... Oh, and we have msr.ko and msr-tools which are the much better solution anyway. So off it goes... Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20161024173844.23038-4-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/devicetree')