Skip to content

Instantly share code, notes, and snippets.

View xguerin's full-sized avatar

Xavier R. Guérin xguerin

View GitHub Profile
@xguerin
xguerin / ftrace_thp.txt
Created January 20, 2023 11:52
FTrace of a THP page fault on Linux 5.19.0
250953 [005] 44480.180435126: user_exit:
250953 [005] 44480.180435252: function: down_read_trylock
250953 [005] 44480.180435332: function: find_vma
250953 [005] 44480.180435414: function: vmacache_find
250953 [005] 44480.180435719: function: vmacache_update
250953 [005] 44480.180435802: function: handle_mm_fault
250953 [005] 44480.180435881: function: mem_cgroup_from_task
250953 [005] 44480.180435979: function: __count_memcg_events
250953 [005] 44480.180436056: function: cgroup_rstat_updated
250953 [005] 44480.180436157: function: __handle_mm_fault
@xguerin
xguerin / build-llvm.sh
Created September 30, 2020 12:54
Build LLVM
#!/bin/sh
set -e
if [ $# -ne 1 ]
then
echo "Usage: $0 VERSION"
exit
fi
let beacon =
new beacon ~zero:(fun() -> 0) ~next:(fun v -> v + 1)
let apply_fn (v0, v1) =
Logs_lwt.info (fun m -> m "(%d, %d)" v0 v1)
>>= fun () -> Lwt.return (v0, v1)
let () =
Logs.set_reporter (Logs.format_reporter ());
Logs.set_level (Some Logs.Info);
2019-07-01 11:45:29,432 - Log4JLogChute initialized using file 'velocity.log'
2019-07-01 11:45:29,433 - Initializing Velocity, Calling init()...
2019-07-01 11:45:29,433 - Starting Apache Velocity v1.7 (compiled: 2010-11-19 12:14:37)
2019-07-01 11:45:29,433 - Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
2019-07-01 11:45:29,433 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogChute
2019-07-01 11:45:29,433 - Target log system for org.apache.velocity.runtime.log.AvalonLogChute is not available (java.lang.NoClassDefFoundError: org.apache.log.format.Formatter). Falling back to next log system...
2019-07-01 11:45:29,433 - Trying to use logger class org.apache.velocity.runtime.log.Log4JLogChute
2019-07-01 11:45:29,433 - Using logger class org.apache.velocity.runtime.log.Log4JLogChute
2019-07-01 11:45:29,438 - ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.StringResourceLoader
2019-07-01 11:45:29,438 - Creating string repository using
public class WatchExample {
private static final Logger logger = LoggerFactory.getLogger(WatchExample.class);
public static void main(String[] args) throws InterruptedException {
final CountDownLatch closeLatch = new CountDownLatch(1);
Config config = new ConfigBuilder().build();
final KubernetesClient client = new DefaultKubernetesClient(config);
/*
* Pre-register our CRD signature with the embedded JSON deserializer. This is a required step.