/* * 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 *self, 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 *self, 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 *self, 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); } value='linux-3.10.y'>linux-3.10.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2026-02-26icmp: prevent possible overflow in icmp_global_allow()Eric Dumazet
2026-02-26xfrm: fix ip_rt_bug race in icmp_route_lookup reverse pathJiayuan Chen
2026-02-26inet: RAW sockets using IPPROTO_RAW MUST drop incoming ICMPEric Dumazet
2025-09-11ipv4: icmp: Fix source IP derivation in presence of VRFsIdo Schimmel
2025-09-11ipv4: icmp: Pass IPv4 control block structure as an argument to __icmp_send()Ido Schimmel
2025-09-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski
2025-09-01icmp: fix icmp_ndo_send address translation for reply directionFabian Bläse
2025-08-29ipv4: start using dst_dev_rcu()Eric Dumazet
2025-08-26ipv4: Convert ->flowi4_tos to dscp_t.Guillaume Nault
2025-08-19net: Switch to skb_dstref_steal/skb_dstref_restore for ip_route_input callersStanislav Fomichev
2025-07-02ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu]Eric Dumazet
2025-02-28inet: ping: avoid skb_clone() dance in ping_rcv()Eric Dumazet
2025-02-28ipv4: icmp: do not process ICMP_EXT_ECHOREPLY for broadcast/multicast addressesEric Dumazet
2025-02-18icmp: reflect tos through ip cookie rather than updating inet_skWillem de Bruijn
2025-02-06ipv4: icmp: convert to dev_net_rcu()Eric Dumazet
2024-12-17inetpeer: do not get a refcount in inet_getpeer()Eric Dumazet
2024-12-17inetpeer: remove create argument of inet_getpeer_v[46]()Eric Dumazet
2024-11-30net: Fix icmp host relookup triggering ip_rt_bugDong Chenchen
2024-11-12net: ip: make ip_route_input() return drop reasonsMenglong Dong
2024-10-29ipv4: Prepare icmp_reply() to future .flowi4_tos conversion.Guillaume Nault
2024-10-03ipv4: Convert ip_route_input() to dscp_t.Guillaume Nault
2024-10-03ipv4: Convert icmp_route_lookup() to dscp_t.Guillaume Nault
2024-09-09ipv4: icmp: Unmask upper DSCP bits in icmp_reply()Ido Schimmel
2024-08-31ipv4: icmp: Unmask upper DSCP bits in icmp_route_lookup()Ido Schimmel
2024-08-30icmp: icmp_msgs_per_sec and icmp_msgs_burst sysctls become per netnsEric Dumazet
2024-08-30icmp: move icmp_global.credit and icmp_global.stamp to per netns storageEric Dumazet
2024-08-30icmp: change the order of rate limitsEric Dumazet
2024-08-22ipv4: icmp: Pass full DS field to ip_route_input()Ido Schimmel
2024-05-08net/ipv4: add tracepoint for icmp_sendPeilin He
2024-04-30inet: introduce dst_rtable() helperEric Dumazet
2024-04-22icmp: prevent possible NULL dereferences from icmp_build_probe()Eric Dumazet
2023-10-06xfrm: pass struct net to xfrm_decode_session wrappersFlorian Westphal
2023-03-31icmp: guard against too small mtuEric Dumazet
2023-01-26icmp: Add counters for rate limitsJamie Bainbridge
2022-11-18treewide: use get_random_u32_below() instead of deprecated functionJason A. Donenfeld