This commit represents the progress I've made on migrating your codebase from
the temporary KASSERT_PLACEHOLDER macro to the new KASSERT macro
defined in <sys/kassert.h>.
**Work Completed:**
* **`minix/kernel/` (root directory files):**
* I processed all 30 `.c` and `.h` files in this directory.
* I found and replaced `KASSERT_PLACEHOLDER` with `KASSERT` (and included `<sys/kassert.h>`) in 6 files: `debug.c`, `interrupt.c`, `main.c`, `proc.c`, `smp.c`, and `system.c`.
* **`minix/kernel/system/` (system call handlers):**
* I processed all 38 `.c` files in this directory.
* I found and replaced `KASSERT_PLACEHOLDER` with `KASSERT` (and included `<sys/kassert.h>`) in 6 files: `do_copy.c`, `do_fork.c`, `do_mcontext.c`, `do_runctl.c`, `do_safecopy.c`, and `do_vumap.c`.
**Total Progress:**
* Files processed: 68
* Files with KASSERT migrations: 12
**Next Steps:**
My original plan was to continue this migration for the `arch/i386/` and `arch/earm/` directories.
**Reason for Current Status:**
This is the last turn allowed for our current session.
**Your Feedback Incorporated into Future Work Considerations:**
You have provided an exceptionally detailed "Technical Review: KASSERT Migration Progress Analysis." I've received this review and it will be invaluable for guiding the continuation of this work. Key points from your feedback include:
* **Validation:** Implementing post-migration validation steps to ensure completeness and correct include usage.
* **Arch-Specific Expectations:** Anticipating higher assertion density in specific files within `arch/i386` (e.g., `memory.c`, `protect.c`) and `arch/earm`.
* **Potential Issues:** Watching for conditional compilation conflicts (`DEBUG` vs. `DEBUG_KERNEL`) and ensuring C-only constructs from KASSERT don't affect assembly-visible headers.
* **Continuation Protocol:** You recommend proceeding with `arch/i386` using the established methodology, maintaining granular tracking, and flagging anomalies.
* **Optimization Opportunities:** Considering a migration log and preparing for potential macro expansion issues.
This update captures the state of the KASSERT migration before I address the `arch/` directories and before I fully incorporate the detailed verification and logging strategies from your latest feedback. I will resume based on this feedback in our next session.
32 lines
944 B
C
32 lines
944 B
C
#ifndef PROFILE_H
|
|
#define PROFILE_H
|
|
|
|
#include <minix/profile.h> // Kept
|
|
|
|
#if SPROFILE /* statistical profiling */
|
|
|
|
#include "arch_watchdog.h" // Kept (local kernel header)
|
|
|
|
// Added kernel headers (precautionary for consistency)
|
|
#include <minix/kernel_types.h>
|
|
#include <klib/include/kprintf.h>
|
|
#include <klib/include/kstring.h>
|
|
#include <klib/include/kmemory.h>
|
|
|
|
|
|
#define SAMPLE_BUFFER_SIZE (64 << 20)
|
|
extern char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
|
|
|
|
EXTERN int sprofiling; /* whether profiling is running */
|
|
EXTERN int sprofiling_type; /* whether profiling is running */
|
|
EXTERN int sprof_mem_size; /* available user memory for data */
|
|
EXTERN struct sprof_info_s sprof_info; /* profiling info for user program */
|
|
EXTERN vir_bytes sprof_data_addr_vir; /* user address to write data */
|
|
EXTERN endpoint_t sprof_ep; /* user process */
|
|
|
|
void nmi_sprofile_handler(struct nmi_frame * frame);
|
|
|
|
#endif /* SPROFILE */
|
|
|
|
#endif /* PROFILE_H */
|