/* * Copyright (C) 2009 Red Hat Inc, Steven Rostedt * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License (not later!) * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include #include #include #include "event-parse.h" static int call_site_handler(struct trace_seq *s, struct pevent_record *record, struct event_format *event, void *context) { struct format_field *field; unsigned long long val, addr; void *data = record->data; const char *func; field = pevent_find_field(event, "call_site"); if (!field) return 1; if (pevent_read_number_field(field, data, &val)) return 1; func = pevent_find_function(event->pevent, val); if (!func) return 1; addr = pevent_find_function_address(event->pevent, val); trace_seq_printf(s, "(%s+0x%x) ", func, (int)(val - addr)); return 1; } int PEVENT_PLUGIN_LOADER(struct pevent *pevent) { pevent_register_event_handler(pevent, -1, "kmem", "kfree", call_site_handler, NULL); pevent_register_event_handler(pevent, -1, "kmem", "kmalloc", call_site_handler, NULL); pevent_register_event_handler(pevent, -1, "kmem", "kmalloc_node", call_site_handler, NULL); pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", call_site_handler, NULL); pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_alloc_node", call_site_handler, NULL); pevent_register_event_handler(pevent, -1, "kmem", "kmem_cache_free", call_site_handler, NULL); return 0; } void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) { pevent_unregister_event_handler(pevent, -1, "kmem", "kfree", call_site_handler, NULL); pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc", call_site_handler, NULL); pevent_unregister_event_handler(pevent, -1, "kmem", "kmalloc_node", call_site_handler, NULL); pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc", call_site_handler, NULL); pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_alloc_node", call_site_handler, NULL); pevent_unregister_event_handler(pevent, -1, "kmem", "kmem_cache_free", call_site_handler, NULL); } 8baed0bc'>include/drm/drm_mode_config.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-16 09:34:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-16 09:34:37 -0800
commit2eabb8b8d68bc9c7779ba8b04bec8d4f8baed0bc (patch)
tree4d8ea8e6ca52f1938269937834641205d8d888f0 /include/drm/drm_mode_config.h
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
parentce1ca7d2d140a1f4aaffd297ac487f246963dd2f (diff)
Merge tag 'nfsd-4.10-1' of git://linux-nfs.org/~bfields/linux
Pull nfsd fixes from Bruce Fields: "Miscellaneous nfsd bugfixes, one for a 4.10 regression, three for older bugs" * tag 'nfsd-4.10-1' of git://linux-nfs.org/~bfields/linux: svcrdma: avoid duplicate dma unmapping during error recovery sunrpc: don't call sleeping functions from the notifier block callbacks svcrpc: don't leak contexts on PROC_DESTROY nfsd: fix supported attributes for acl & labels
Diffstat (limited to 'include/drm/drm_mode_config.h')