From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: [patch for 2.6.26 3/7] LTTng instrumentation ipc
Date: Thu, 27 Mar 2008 09:21:00 -0400 [thread overview]
Message-ID: <20080327133013.575499799@polymtl.ca> (raw)
In-Reply-To: 20080327132057.449831367@polymtl.ca
[-- Attachment #1: lttng-instrumentation-ipc.patch --]
[-- Type: text/plain, Size: 3432 bytes --]
Interprocess communication, core events.
Added markers :
ipc_msg_create
ipc_sem_create
ipc_shm_create
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
ipc/msg.c | 6 +++++-
ipc/sem.c | 6 +++++-
ipc/shm.c | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
Index: linux-2.6-lttng/ipc/msg.c
===================================================================
--- linux-2.6-lttng.orig/ipc/msg.c 2008-03-27 07:40:09.000000000 -0400
+++ linux-2.6-lttng/ipc/msg.c 2008-03-27 07:40:12.000000000 -0400
@@ -37,6 +37,7 @@
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <linux/ipc_namespace.h>
+#include <linux/marker.h>
#include <asm/current.h>
#include <asm/uaccess.h>
@@ -293,6 +294,7 @@ asmlinkage long sys_msgget(key_t key, in
struct ipc_namespace *ns;
struct ipc_ops msg_ops;
struct ipc_params msg_params;
+ long ret;
ns = current->nsproxy->ipc_ns;
@@ -303,7 +305,9 @@ asmlinkage long sys_msgget(key_t key, in
msg_params.key = key;
msg_params.flg = msgflg;
- return ipcget(ns, &msg_ids(ns), &msg_ops, &msg_params);
+ ret = ipcget(ns, &msg_ids(ns), &msg_ops, &msg_params);
+ trace_mark(ipc_msg_create, "id %ld flags %d", ret, msgflg);
+ return ret;
}
static inline unsigned long
Index: linux-2.6-lttng/ipc/sem.c
===================================================================
--- linux-2.6-lttng.orig/ipc/sem.c 2008-03-27 07:40:09.000000000 -0400
+++ linux-2.6-lttng/ipc/sem.c 2008-03-27 07:40:12.000000000 -0400
@@ -83,6 +83,7 @@
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <linux/ipc_namespace.h>
+#include <linux/marker.h>
#include <asm/uaccess.h>
#include "util.h"
@@ -312,6 +313,7 @@ asmlinkage long sys_semget(key_t key, in
struct ipc_namespace *ns;
struct ipc_ops sem_ops;
struct ipc_params sem_params;
+ long err;
ns = current->nsproxy->ipc_ns;
@@ -326,7 +328,9 @@ asmlinkage long sys_semget(key_t key, in
sem_params.flg = semflg;
sem_params.u.nsems = nsems;
- return ipcget(ns, &sem_ids(ns), &sem_ops, &sem_params);
+ err = ipcget(ns, &sem_ids(ns), &sem_ops, &sem_params);
+ trace_mark(ipc_sem_create, "id %ld flags %d", err, semflg);
+ return err;
}
/* Manage the doubly linked list sma->sem_pending as a FIFO:
Index: linux-2.6-lttng/ipc/shm.c
===================================================================
--- linux-2.6-lttng.orig/ipc/shm.c 2008-03-27 07:40:09.000000000 -0400
+++ linux-2.6-lttng/ipc/shm.c 2008-03-27 07:40:12.000000000 -0400
@@ -39,6 +39,7 @@
#include <linux/nsproxy.h>
#include <linux/mount.h>
#include <linux/ipc_namespace.h>
+#include <linux/marker.h>
#include <asm/uaccess.h>
@@ -482,6 +483,7 @@ asmlinkage long sys_shmget (key_t key, s
struct ipc_namespace *ns;
struct ipc_ops shm_ops;
struct ipc_params shm_params;
+ long err;
ns = current->nsproxy->ipc_ns;
@@ -493,7 +495,9 @@ asmlinkage long sys_shmget (key_t key, s
shm_params.flg = shmflg;
shm_params.u.size = size;
- return ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params);
+ err = ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params);
+ trace_mark(ipc_shm_create, "id %ld flags %d", err, shmflg);
+ return err;
}
static inline unsigned long copy_shmid_to_user(void __user *buf, struct shmid64_ds *in, int version)
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2008-03-27 13:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 13:20 [patch for 2.6.26 0/7] Architecture Independent Markers Mathieu Desnoyers
2008-03-27 13:20 ` [patch for 2.6.26 1/7] Markers - define non optimized marker Mathieu Desnoyers
2008-03-27 13:20 ` [patch for 2.6.26 2/7] LTTng instrumentation fs Mathieu Desnoyers
2008-03-27 13:21 ` Mathieu Desnoyers [this message]
2008-03-27 13:21 ` [patch for 2.6.26 4/7] LTTng instrumentation kernel Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 5/7] LTTng instrumentation mm Mathieu Desnoyers
2008-03-27 13:21 ` Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 6/7] LTTng instrumentation net Mathieu Desnoyers
2008-03-27 13:21 ` [patch for 2.6.26 7/7] LTTng instrumentation - lib Mathieu Desnoyers
2008-03-27 15:40 ` [patch for 2.6.26 0/7] Architecture Independent Markers Ingo Molnar
2008-03-27 17:08 ` KOSAKI Motohiro
2008-03-28 10:15 ` Ingo Molnar
2008-03-28 13:34 ` [OT] " Masami Hiramatsu
2008-04-01 1:43 ` Denys Vlasenko
2008-04-01 14:30 ` Masami Hiramatsu
2008-03-28 13:40 ` Frank Ch. Eigler
2008-03-28 14:18 ` Ingo Molnar
2008-03-28 14:41 ` Ingo Molnar
2008-03-28 15:31 ` Frank Ch. Eigler
2008-03-27 20:39 ` Mathieu Desnoyers
2008-03-28 9:43 ` Ingo Molnar
2008-03-28 11:22 ` Ingo Molnar
2008-03-28 11:38 ` Mathieu Desnoyers
2008-03-28 13:33 ` Ingo Molnar
2008-03-29 17:16 ` Mathieu Desnoyers
2008-03-27 21:49 ` Frank Ch. Eigler
2008-03-28 0:01 ` Denys Vlasenko
2008-03-28 1:02 ` [PATCH] Markers - remove extra format argument Mathieu Desnoyers
2008-03-28 5:35 ` Masami Hiramatsu
2008-03-28 1:04 ` [patch for 2.6.26 1/7] Markers - define non optimized marker (updated) Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080327133013.575499799@polymtl.ca \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.