X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=libust%2Frelay.c;h=3259adee432da29fb1b063605b1d7bab01be3255;hb=e529b2f9f5df9d1cac422bb52aa37e0480c9554e;hp=1235a9a7cd481a17dd5dd9adc3bebed76e879826;hpb=772030fed323e388da467735cf4b5e8781acb710;p=ust.git diff --git a/libust/relay.c b/libust/relay.c index 1235a9a..3259ade 100644 --- a/libust/relay.c +++ b/libust/relay.c @@ -101,7 +101,11 @@ static int relay_alloc_buf(struct rchan_buf *buf, size_t *size) *size = PAGE_ALIGN(*size); result = buf->shmid = shmget(getpid(), *size, IPC_CREAT | IPC_EXCL | 0700); - if(buf->shmid == -1) { + if(result == -1 && errno == EINVAL) { + ERR("shmget() returned EINVAL; maybe /proc/sys/kernel/shmmax should be increased."); + return -1; + } + else if(result == -1) { PERROR("shmget"); return -1; } @@ -2466,8 +2470,6 @@ static /* inline */ void ltt_write_commit_counter(struct rchan_buf *buf, */ ltt_write_commit_counter(buf, ltt_buf, endidx, buf_offset, commit_count, data_size); - - DBG("commited slot. now commit count is %ld", commit_count); }