Instantly share code, notes, and snippets.

View cache-test-simple.c
/*
* See if I can trigger the cache trashing issue.
*
* Use tcc to compile and run with:
* ./tcc -B. -DNOPS=0 -run cache-test-simple.c
*
* For performance metrics, try
* perf stat -d -d -d ./tcc -B. -DNOPS=0 -run cache-test-simple.c
*/
#include <stdio.h>
View rand-cblock.pl
use strict;
use warnings;
use C::Blocks;
use C::Blocks::Types qw(uint);
my $N = $ARGV[0] || 100;
sub KISS_rand {
my uint $to_return = 0;
cblock {
static unsigned int x = 123456789,y = 362436000,
View keyword-scope.pl
use strict;
use warnings;
use C::Blocks;
use C::Blocks::PerlAPI;
# Write a little keyword hook that simply prints the keywords it encounters
clex {
int (*next_keyword_plugin)(pTHX_ char *, STRLEN, OP **);
int prev_count;
View desktop-meta
[directory]
caja-icon-view-keep-aligned=true
caja-icon-view-layout-timestamp=1447250394
caja-window-scroll-position=file:///home/dcmertens/Desktop/Georgios-meeting-notes
caja-icon-view-tighter-layout=false
[home]
caja-icon-position=64,22
icon-scale=1
caja-icon-position-timestamp=1447250394
View names.txt
memcpy func
memset func
div func
fabs func
gcvt func
tzset func
strerror func
Perl_pregcomp func
Perl_pregfree func
isalnum func
View Compiler command and output
cc -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/dcmertens/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi/CORE -Wl,-E -fstack-protector -L/usr/local/lib -L/home/dcmertens/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc func_test_402YB8e5.c -o func_test_9EF5Maod
/tmp/ccXxD47M.o: In function `S_croak_memory_wrap':
func_test_402YB8e5.c:(.text+0x5): undefined reference to `PL_memory_wrap'
func_test_402YB8e5.c:(.text+0x14): undefined reference to `Perl_croak_nocontext'
collect2: error: ld returned 1 exit status
View libperl.xs.PL
# Here's what needs to happen:
# 1) Add a compiler switch to tcc that lets me specify the output filename for
# serialized extended symbol tables. DONE
# 2) Add a compiler switch to tcc that lets me specify the output filename for
# a list of global identifier names. DONE
# 3) Compile a text file with the headers below, saving the serialized extended
# symbol table and the list of global identifiers
# 4) Create an XS file with a BOOT section that loads the serialized table,
# adds the global identifiers, and pushes the extended symbol table onto the
# Perl exsymtab collection.
View ToTest.pm
package ToTest;
use 5.008_008;
use strict;
use warnings;
our $VERSION = '0.04';
require XSLoader;
XSLoader::load('ToTest', $VERSION);
View lib-ToTest.pm
package ToTest;
use 5.008_008;
use strict;
use warnings;
our $VERSION = '0.01';
require XSLoader;
XSLoader::load('ToTest', $VERSION);
View Tests.i
This file has been truncated, but you can view the full file.
# 1 "lib/CUDA/Minimal/Tests.c"
# 1 "<command-line>"
# 1 "/usr/local/cuda/bin/..//include/cuda_runtime.h" 1
# 59 "/usr/local/cuda/bin/..//include/cuda_runtime.h"
# 1 "/usr/local/cuda/bin/..//include/host_config.h" 1
# 119 "/usr/local/cuda/bin/..//include/host_config.h"
# 1 "/usr/include/features.h" 1 3 4
# 323 "/usr/include/features.h" 3 4
# 1 "/usr/include/i386-linux-gnu/bits/predefs.h" 1 3 4