+
+
+
+ /* commit */
+ ltt_commit_slot(buf, buff, slot_size);
+
+
+
+
+#if 0
+ fprintf(fp, "\t\tdo {\n");
+ fprintf(fp, "\t\t\told_offset = buf->offset;\n");
+ fprintf(fp, "\t\t\tptr = (char*)buf->data + old_offset;\n");
+
+
+ fprintf(fp, "\t\t\theader_length = ltt_get_event_header_data(trace, "
+ "channel,\n"
+ "\t\t\t\t\t\t\t\t\t\tptr, &_offset, &delta, &tsc);\n");
+
+ fprintf(fp, "\t\t\tptr += _offset + header_length;\n");
+
+ fprintf(fp, "\t\t\tbuff = relay_reserve(channel->rchan, event_length, "
+ "old_offset);\n");
+ fprintf(fp, "\n");
+ fprintf(fp, "\t\t} while(PTR_ERR(buff) == -EAGAIN);\n");
+ fprintf(fp, "\n");
+
+
+ /* Reserve the channel */
+ //fprintf(fp, "\t\tbuff = relay_reserve(channel->rchan, event_length);\n");
+ fprintf(fp, "\t\tif(buff == NULL) {\n");
+ fprintf(fp, "\t\t\t/* Buffer is full*/\n");
+ fprintf(fp, "\t\t\t/* for debug BUG(); */\n"); // DEBUG!
+ fprintf(fp, "\t\t\tchannel->events_lost[smp_processor_id()]++;\n");
+ fprintf(fp, "\t\t\tbreak;\n"); /* don't commit a NULL reservation! */
+ fprintf(fp, "\t\t}\n");
+
+ /* DEBUG */
+ //fprintf(fp, "\t\tif(resret == 1) {\n");
+ //fprintf(fp, "printk(\"f%%lu e\%%u \", ltt_facility_%s_%X, event_%s);",
+ // facName, checksum, ev->name);
+ //fprintf(fp, "\t\t}\n");
+
+ //set ptr to the end of first struct if needed;
+ //if(structCount + hasStrSeq > 1){
+ // fprintf(fp,"\n\t\t//set ptr to the end of the first struct\n");
+ // fprintf(fp,"\t\tptr += sizeof(struct %s_%s_1);\n\n",ev->name, facName);
+ //}
+