Skip to content

Commit

Permalink
[S390] cio: increase trace level
Browse files Browse the repository at this point in the history
Move debug traces for start I/O and interrupt events to exclusive
trace levels. Also change tracing in hot-path from sprintf (costly)
to hex.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 11, 2009
1 parent 626e476 commit efd986d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 31 deletions.
44 changes: 15 additions & 29 deletions drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,11 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
__u8 lpm, /* logical path mask */
__u8 key) /* storage key */
{
char dbf_txt[15];
int ccode;
union orb *orb;

CIO_TRACE_EVENT(4, "stIO");
CIO_TRACE_EVENT(4, dev_name(&sch->dev));
CIO_TRACE_EVENT(5, "stIO");
CIO_TRACE_EVENT(5, dev_name(&sch->dev));

orb = &to_io_private(sch)->orb;
memset(orb, 0, sizeof(union orb));
Expand All @@ -169,8 +168,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
ccode = ssch(sch->schid, orb);

/* process condition code */
sprintf(dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT(4, dbf_txt);
CIO_HEX_EVENT(5, &ccode, sizeof(ccode));

switch (ccode) {
case 0:
Expand Down Expand Up @@ -201,16 +199,14 @@ cio_start (struct subchannel *sch, struct ccw1 *cpa, __u8 lpm)
int
cio_resume (struct subchannel *sch)
{
char dbf_txt[15];
int ccode;

CIO_TRACE_EVENT (4, "resIO");
CIO_TRACE_EVENT(4, "resIO");
CIO_TRACE_EVENT(4, dev_name(&sch->dev));

ccode = rsch (sch->schid);

sprintf (dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT (4, dbf_txt);
CIO_HEX_EVENT(4, &ccode, sizeof(ccode));

switch (ccode) {
case 0:
Expand All @@ -235,22 +231,20 @@ cio_resume (struct subchannel *sch)
int
cio_halt(struct subchannel *sch)
{
char dbf_txt[15];
int ccode;

if (!sch)
return -ENODEV;

CIO_TRACE_EVENT (2, "haltIO");
CIO_TRACE_EVENT(2, "haltIO");
CIO_TRACE_EVENT(2, dev_name(&sch->dev));

/*
* Issue "Halt subchannel" and process condition code
*/
ccode = hsch (sch->schid);

sprintf (dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT (2, dbf_txt);
CIO_HEX_EVENT(2, &ccode, sizeof(ccode));

switch (ccode) {
case 0:
Expand All @@ -270,22 +264,20 @@ cio_halt(struct subchannel *sch)
int
cio_clear(struct subchannel *sch)
{
char dbf_txt[15];
int ccode;

if (!sch)
return -ENODEV;

CIO_TRACE_EVENT (2, "clearIO");
CIO_TRACE_EVENT(2, "clearIO");
CIO_TRACE_EVENT(2, dev_name(&sch->dev));

/*
* Issue "Clear subchannel" and process condition code
*/
ccode = csch (sch->schid);

sprintf (dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT (2, dbf_txt);
CIO_HEX_EVENT(2, &ccode, sizeof(ccode));

switch (ccode) {
case 0:
Expand All @@ -306,19 +298,17 @@ cio_clear(struct subchannel *sch)
int
cio_cancel (struct subchannel *sch)
{
char dbf_txt[15];
int ccode;

if (!sch)
return -ENODEV;

CIO_TRACE_EVENT (2, "cancelIO");
CIO_TRACE_EVENT(2, "cancelIO");
CIO_TRACE_EVENT(2, dev_name(&sch->dev));

ccode = xsch (sch->schid);

sprintf (dbf_txt, "ccode:%d", ccode);
CIO_TRACE_EVENT (2, dbf_txt);
CIO_HEX_EVENT(2, &ccode, sizeof(ccode));

switch (ccode) {
case 0: /* success */
Expand Down Expand Up @@ -429,11 +419,10 @@ EXPORT_SYMBOL_GPL(cio_update_schib);
*/
int cio_enable_subchannel(struct subchannel *sch, u32 intparm)
{
char dbf_txt[15];
int retry;
int ret;

CIO_TRACE_EVENT (2, "ensch");
CIO_TRACE_EVENT(2, "ensch");
CIO_TRACE_EVENT(2, dev_name(&sch->dev));

if (sch_is_pseudo_sch(sch))
Expand All @@ -460,8 +449,7 @@ int cio_enable_subchannel(struct subchannel *sch, u32 intparm)
} else
break;
}
sprintf (dbf_txt, "ret:%d", ret);
CIO_TRACE_EVENT (2, dbf_txt);
CIO_HEX_EVENT(2, &ret, sizeof(ret));
return ret;
}
EXPORT_SYMBOL_GPL(cio_enable_subchannel);
Expand All @@ -472,11 +460,10 @@ EXPORT_SYMBOL_GPL(cio_enable_subchannel);
*/
int cio_disable_subchannel(struct subchannel *sch)
{
char dbf_txt[15];
int retry;
int ret;

CIO_TRACE_EVENT (2, "dissch");
CIO_TRACE_EVENT(2, "dissch");
CIO_TRACE_EVENT(2, dev_name(&sch->dev));

if (sch_is_pseudo_sch(sch))
Expand All @@ -495,8 +482,7 @@ int cio_disable_subchannel(struct subchannel *sch)
} else
break;
}
sprintf (dbf_txt, "ret:%d", ret);
CIO_TRACE_EVENT (2, dbf_txt);
CIO_HEX_EVENT(2, &ret, sizeof(ret));
return ret;
}
EXPORT_SYMBOL_GPL(cio_disable_subchannel);
Expand Down
4 changes: 2 additions & 2 deletions drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,8 +1168,8 @@ static void io_subchannel_irq(struct subchannel *sch)

cdev = sch_get_cdev(sch);

CIO_TRACE_EVENT(3, "IRQ");
CIO_TRACE_EVENT(3, dev_name(&sch->dev));
CIO_TRACE_EVENT(6, "IRQ");
CIO_TRACE_EVENT(6, dev_name(&sch->dev));
if (cdev)
dev_fsm_event(cdev, DEV_EVENT_INTERRUPT);
}
Expand Down

0 comments on commit efd986d

Please sign in to comment.